fix(parsers): detect stale jobs by run age
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 20s
CI/CD Pipeline / Build and Push Images (push) Successful in 6s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-04-28 21:56:01 +02:00
parent 0682398935
commit 5857f1a4d2
7 changed files with 90 additions and 37 deletions

View File

@@ -291,7 +291,7 @@ class BackgroundJobServiceTest(TestCase):
old_timestamp = timezone.now() - timedelta(hours=3)
BackgroundJob.objects.filter(
task_id__in=[stale_job.task_id, unrelated_job.task_id]
).update(updated_at=old_timestamp)
).update(created_at=old_timestamp, updated_at=timezone.now())
updated = BackgroundJobService.mark_stale_active_jobs_failed(
max_age_minutes=90,