Merge pull request #3119 from alphagov/new-callbacks-q

Put service callback retries on a different queue
This commit is contained in:
Katie Smith
2021-02-10 15:56:46 +00:00
committed by GitHub
5 changed files with 7 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ def _send_data_to_service_callback_api(self, data, service_callback_url, token,
)
if not isinstance(e, HTTPError) or e.response.status_code >= 500:
try:
self.retry(queue=QueueNames.RETRY)
self.retry(queue=QueueNames.CALLBACKS_RETRY)
except self.MaxRetriesExceededError:
current_app.logger.warning(
"Retry: {} has retried the max num of times for callback url {} and notification_id: {}".format(

View File

@@ -27,6 +27,7 @@ class QueueNames(object):
PROCESS_FTP = 'process-ftp-tasks'
CREATE_LETTERS_PDF = 'create-letters-pdf-tasks'
CALLBACKS = 'service-callbacks'
CALLBACKS_RETRY = 'service-callbacks-retry'
LETTERS = 'letter-tasks'
SMS_CALLBACKS = 'sms-callbacks'
ANTIVIRUS = 'antivirus-tasks'
@@ -50,6 +51,7 @@ class QueueNames(object):
QueueNames.NOTIFY,
QueueNames.CREATE_LETTERS_PDF,
QueueNames.CALLBACKS,
QueueNames.CALLBACKS_RETRY,
QueueNames.LETTERS,
QueueNames.SMS_CALLBACKS,
QueueNames.SAVE_API_EMAIL,