fix(metrics): use real job_status enum values (queued/processing/complete)
This commit is contained in:
parent
ef4c301149
commit
b128c9f5a9
1 changed files with 3 additions and 3 deletions
|
|
@ -46,12 +46,12 @@ router.get('/home', async (req, res, next) => {
|
|||
|
||||
const [assets, jobsDone, jobsFailed, recordersTotal, recordersLive, jobsRunning, jobsDoneTotal, jobsFailedTotal] = await Promise.all([
|
||||
bucketSeries('assets', hours),
|
||||
bucketSeries('jobs', hours, `t.status = 'done'`),
|
||||
bucketSeries('jobs', hours, `t.status = 'complete'`),
|
||||
bucketSeries('jobs', hours, `t.status = 'failed'`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM recorders`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM recorders WHERE status = 'recording'`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM jobs WHERE status IN ('queued','running')`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM jobs WHERE status = 'done'`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM jobs WHERE status IN ('queued','processing')`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM jobs WHERE status = 'complete'`),
|
||||
pool.query(`SELECT COUNT(*)::int AS n FROM jobs WHERE status = 'failed'`),
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue