fix(awooop): make ansible cooldown query asyncpg safe
This commit is contained in:
@@ -421,11 +421,11 @@ async def recent_ansible_transport_blockers(
|
||||
FROM automation_operation_log
|
||||
WHERE operation_type = 'ansible_check_mode_executed'
|
||||
AND status = 'failed'
|
||||
AND created_at >= NOW() - CAST(:cooldown AS interval)
|
||||
AND created_at >= NOW() - (:cooldown_seconds * INTERVAL '1 second')
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 20
|
||||
"""),
|
||||
{"cooldown": f"{max(60, cooldown)} seconds"},
|
||||
{"cooldown_seconds": max(60, cooldown)},
|
||||
)
|
||||
blockers: set[str] = set()
|
||||
for row in result.mappings().all():
|
||||
|
||||
Reference in New Issue
Block a user