dbjobqueue: Filter maintenance queries based on results
Jobs that already had their results nulled, shouldn't be included in the maintenance job.
This commit is contained in:
parent
4827f0e83e
commit
8bfc6c9961
2 changed files with 2 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ const (
|
|||
sqlQueryJobsUptoByType = `
|
||||
SELECT array_agg(id), type
|
||||
FROM jobs
|
||||
WHERE type = ANY($1) AND finished_at < $2
|
||||
WHERE type = ANY($1) AND finished_at < $2 AND result IS NOT NULL
|
||||
GROUP BY type`
|
||||
sqlDeleteJobResult = `
|
||||
UPDATE jobs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue