mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 20:03: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:
|
except Exception as ex:
|
||||||
retry_count = self.request.retries
|
retry_count = self.request.retries
|
||||||
wait_time = 3600 * 2**retry_count
|
wait_time = 3600 * 2**retry_count
|
||||||
|
|
||||||
|
current_app.logger.exception(str(ex))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
raise self.retry(ex=ex, countdown=wait_time)
|
raise self.retry(ex=ex, countdown=wait_time)
|
||||||
except self.MaxRetriesExceededError:
|
except self.MaxRetriesExceededError:
|
||||||
current_app.logger.error(
|
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(
|
@notify_celery.task(
|
||||||
|
|||||||
Reference in New Issue
Block a user