mirror of
https://github.com/GSA/notifications-api.git
synced 2026-04-28 05:10:12 -04:00
Put exception logging in the correct place
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -282,13 +282,15 @@ def process_delivery_receipts(self):
|
||||
except Exception as ex:
|
||||
retry_count = self.request.retries
|
||||
wait_time = 3600 * 2**retry_count
|
||||
|
||||
current_app.logger.exception(str(ex))
|
||||
|
||||
try:
|
||||
raise self.retry(ex=ex, countdown=wait_time)
|
||||
except self.MaxRetriesExceededError:
|
||||
current_app.logger.error(
|
||||
f"Failed process delivery receipts after max retries: {str(ex)}"
|
||||
"Failed process delivery receipts after max retries"
|
||||
)
|
||||
raise ex
|
||||
|
||||
|
||||
@notify_celery.task(
|
||||
|
||||
Reference in New Issue
Block a user