From 9c9581e80831f09e50b88290ff8fb6399f95db43 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Thu, 26 Oct 2017 12:09:14 +0100 Subject: [PATCH] Review Changes - Updated the retry and max_retries of the process_ses_results celery task to be the same as other retry strategies in that file - Provided a message with the 200 to be similar to how other responses are handled --- app/celery/tasks.py | 2 +- app/notifications/notifications_ses_callback.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/celery/tasks.py b/app/celery/tasks.py index 27a3b1e01..df1d7bffd 100644 --- a/app/celery/tasks.py +++ b/app/celery/tasks.py @@ -533,7 +533,7 @@ def process_incomplete_job(job_id): job_complete(job, job.service, template, resumed=True) -@notify_celery.task(bind=True, name="process-ses-result", max_retries=12, default_retry_delay=300000) +@notify_celery.task(bind=True, name="process-ses-result", max_retries=5, default_retry_delay=300) @statsd(namespace="tasks") def process_ses_results(self, response): errors = process_ses_response(response) diff --git a/app/notifications/notifications_ses_callback.py b/app/notifications/notifications_ses_callback.py index 4780b4bd7..2ed34037b 100644 --- a/app/notifications/notifications_ses_callback.py +++ b/app/notifications/notifications_ses_callback.py @@ -32,7 +32,9 @@ def sns_callback_handler(): current_app.logger.error(errors) raise InvalidRequest(errors, 400) - return 200 + return jsonify( + result="success", message="SES callback succeeded" + ), 200 def process_ses_response(ses_request):