mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-17 18:52:30 -05:00
Retry process_ses_results if it fails
If the SES task fails retry every 5 mins for an hour. - Updated the process_ses_results task to retry - Added tests to check for retry
This commit is contained in:
@@ -550,7 +550,10 @@ def process_incomplete_job(job_id):
|
||||
job_complete(job, job.service, template, resumed=True)
|
||||
|
||||
|
||||
@notify_celery.task(bind=True, name='process-ses-result')
|
||||
@notify_celery.task(bind=True, name="process-ses-result", max_retries=12, default_retry_delay=300000)
|
||||
@statsd(namespace="tasks")
|
||||
def process_ses_results(self, response):
|
||||
process_ses_response(response)
|
||||
errors = process_ses_response(response)
|
||||
if errors:
|
||||
current_app.logger.error(errors)
|
||||
self.retry(queue=QueueNames.RETRY, exc="SES responses processed with error")
|
||||
|
||||
Reference in New Issue
Block a user