mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-03 14:30:48 -05:00
Merge pull request #3268 from alphagov/update-job-sooner
Update the job_status to in-progress sooner.
This commit is contained in:
@@ -71,6 +71,10 @@ def process_job(job_id, sender_id=None):
|
||||
|
||||
service = job.service
|
||||
|
||||
job.job_status = JOB_STATUS_IN_PROGRESS
|
||||
job.processing_started = start
|
||||
dao_update_job(job)
|
||||
|
||||
if not service.active:
|
||||
job.job_status = JOB_STATUS_CANCELLED
|
||||
dao_update_job(job)
|
||||
@@ -81,10 +85,6 @@ def process_job(job_id, sender_id=None):
|
||||
if __sending_limits_for_job_exceeded(service, job, job_id):
|
||||
return
|
||||
|
||||
job.job_status = JOB_STATUS_IN_PROGRESS
|
||||
job.processing_started = start
|
||||
dao_update_job(job)
|
||||
|
||||
recipient_csv, template, sender_id = get_recipient_csv_and_template_and_sender_id(job)
|
||||
|
||||
current_app.logger.info("Starting job {} processing {} notifications".format(job_id, job.notification_count))
|
||||
|
||||
Reference in New Issue
Block a user