Review funkt
This commit is contained in:
9
node_modules/bullmq/dist/cjs/postgres/commands/clear_logs.sql
generated
vendored
Normal file
9
node_modules/bullmq/dist/cjs/postgres/commands/clear_logs.sql
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Clear a job's logs, keeping the latest $3 entries (NULL/0 → remove all).
|
||||
-- Params: $1 queue, $2 job_id, $3 keepLogs.
|
||||
DELETE FROM job_log
|
||||
WHERE queue = $1 AND job_id = $2
|
||||
AND idx < COALESCE(
|
||||
(SELECT MAX(idx) FROM job_log WHERE queue = $1 AND job_id = $2)
|
||||
- $3 + 1,
|
||||
idx + 1
|
||||
);
|
||||
Reference in New Issue
Block a user