Don't automatically retry failures, and consider never-expiring results to always remain valid

master
Sven Slootweg 1 year ago
parent 59b89a3459
commit 5b8e71c083

@ -34,7 +34,10 @@ function makeFillQuery(withDependencies) {
WHERE
results.is_successful = TRUE
AND results.is_invalidated = FALSE
AND results.expires_at > NOW()
AND (
results.expires_at > NOW()
OR results.expires_at IS NULL
)
),
counts AS (
SELECT item_id, COUNT(task) AS count FROM satisfied GROUP BY item_id
@ -68,9 +71,17 @@ function makeFillQuery(withDependencies) {
item_id = full_candidates.item_id
AND results.task = :task
AND results.task_version = :taskVersion
AND results.is_successful = TRUE
AND results.is_invalidated = FALSE
AND results.expires_at > NOW()
AND (
results.is_successful = FALSE
OR (
results.is_successful = TRUE
AND results.is_invalidated = FALSE
AND (
results.expires_at > NOW()
OR results.expires_at IS NULL
)
)
)
)
`;
}

Loading…
Cancel
Save