Put exception logging in the correct place

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2025-07-30 11:50:36 -04:00
parent 036817daf4
commit bcaf53f78d

View File

@@ -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(