Allow 20 minutes before checking for missing rows

Since we’ve doubled the number of rows in a job, jobs can take twice as
long to insert all the notifications. We don’t check for missing rows
until we’re pretty confident that the original tasks have finished
processing. This means we need to double the time we wait to still be
as sure.
This commit is contained in:
Chris Hill-Scott
2020-09-26 11:06:44 +01:00
parent 2af62bdd1f
commit aace1bdd8a
3 changed files with 38 additions and 8 deletions

View File

@@ -446,14 +446,14 @@ def test_find_jobs_with_missing_rows(sample_email_template):
healthy_job = create_job(template=sample_email_template,
notification_count=3,
job_status=JOB_STATUS_FINISHED,
processing_finished=datetime.utcnow() - timedelta(minutes=11)
processing_finished=datetime.utcnow() - timedelta(minutes=20)
)
for i in range(0, 3):
create_notification(job=healthy_job, job_row_number=i)
job_with_missing_rows = create_job(template=sample_email_template,
notification_count=5,
job_status=JOB_STATUS_FINISHED,
processing_finished=datetime.utcnow() - timedelta(minutes=11)
processing_finished=datetime.utcnow() - timedelta(minutes=20)
)
for i in range(0, 4):
create_notification(job=job_with_missing_rows, job_row_number=i)