fix(parsers): detect stale jobs by run age
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user