Properly handle requests timeout

This commit is contained in:
Zoe Roux 2026-04-01 19:20:12 +02:00
parent c842a05443
commit 6977ffd5d6
No known key found for this signature in database

View File

@ -56,8 +56,6 @@ class RequestCreator:
"""
delete from scanner.requests
where status = 'failed'
or (status = 'running'
and now() - started_at > interval '1 hour')
"""
)
@ -136,6 +134,10 @@ class RequestProcessor:
scanner.requests
where
status = 'pending'
or (
status = 'running'
and now() - started_at > interval '30 minutes'
)
limit 1
for update
skip locked)