Review funkt
This commit is contained in:
14
node_modules/bullmq/dist/cjs/postgres/commands/add_log.sql
generated
vendored
Normal file
14
node_modules/bullmq/dist/cjs/postgres/commands/add_log.sql
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Append a log line at the next per-job ordinal; returns its index.
|
||||
-- Params: $1 queue, $2 job_id, $3 row.
|
||||
-- The unqualified table name resolves in the configured BullMQ schema via
|
||||
-- search_path (default schema: bullmq).
|
||||
INSERT INTO job_log (queue, job_id, idx, row)
|
||||
VALUES (
|
||||
$1, $2,
|
||||
COALESCE(
|
||||
(SELECT MAX(idx) + 1 FROM job_log WHERE queue = $1 AND job_id = $2),
|
||||
0
|
||||
),
|
||||
$3
|
||||
)
|
||||
RETURNING idx;
|
||||
Reference in New Issue
Block a user