Skip to content

Commit

Permalink
useful.sql: build_reasons has been fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed Jun 28, 2024
1 parent b10eb92 commit b8ca9c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/useful.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-- some useful SQL commands (for PostgreSQL)

-- show build log
select id, ts, pkgbase, nv_version, pkg_version, elapsed, result, cputime, case when elapsed = 0 then 0 else cputime * 100 / elapsed end as "cpu%", round(memory / 1073741824.0, 3) as "memory (GiB)", substring(msg for 20) as msg, build_reasons #>> '{}' as build_reasons from pkglog order by id desc;
select id, ts, pkgbase, nv_version, pkg_version, elapsed, result, cputime, case when elapsed = 0 then 0 else cputime * 100 / elapsed end as "cpu%", round(memory / 1073741824.0, 3) as "memory (GiB)", substring(msg for 20) as msg, build_reasons from pkglog order by id desc limit 10;

-- show current build status and expected time
select index, c.pkgbase, updated_at, status, elapsed as last_time, c.build_reasons #>> '{}' as build_reasons from pkgcurrent as c left join lateral (
select index, c.pkgbase, updated_at, status, elapsed as last_time, c.build_reasons from pkgcurrent as c left join lateral (
select elapsed from pkglog where pkgbase = c.pkgbase order by ts desc limit 1
) as log on true order by c.index asc;

Expand Down

0 comments on commit b8ca9c4

Please sign in to comment.