Review funkt

This commit is contained in:
2026-08-09 21:56:00 +00:00
parent f522ae9953
commit fe9dfa4519
11366 changed files with 2335077 additions and 97 deletions

View File

@@ -0,0 +1,10 @@
-- Whether the queue is "maxed": it has a global concurrency limit and the
-- number of active jobs has reached it (mirrors isQueueMaxed). Returns false
-- when no concurrency limit is configured.
-- Params: $1 queue.
SELECT COALESCE(
(SELECT count(*) FROM job WHERE queue = $1 AND state = 'active')
>= (SELECT value::integer FROM meta
WHERE queue = $1 AND field = 'concurrency'),
false
) AS maxed;