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,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
);