Review funkt
This commit is contained in:
13
node_modules/bullmq/dist/cjs/postgres/commands/get_counts.sql
generated
vendored
Normal file
13
node_modules/bullmq/dist/cjs/postgres/commands/get_counts.sql
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Job counts by state for a queue. Param: $1 queue.
|
||||
-- "prioritized" = waiting with priority > 0; "waiting" = waiting with priority 0.
|
||||
SELECT
|
||||
COUNT(*) FILTER (WHERE state = 'active') AS active,
|
||||
COUNT(*) FILTER (WHERE state = 'completed') AS completed,
|
||||
COUNT(*) FILTER (WHERE state = 'failed') AS failed,
|
||||
COUNT(*) FILTER (WHERE state = 'delayed') AS delayed,
|
||||
COUNT(*) FILTER (WHERE state = 'waiting' AND priority = 0) AS waiting,
|
||||
COUNT(*) FILTER (WHERE state = 'waiting' AND priority > 0) AS prioritized,
|
||||
COUNT(*) FILTER (WHERE state = 'waiting-children') AS "waiting-children",
|
||||
(SELECT value FROM meta WHERE queue = $1 AND field = 'paused') AS paused
|
||||
FROM job
|
||||
WHERE queue = $1;
|
||||
Reference in New Issue
Block a user