Debuggong and stuff.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-12-03 11:32:33 -05:00
parent 6e1772e8e6
commit 00908593dd
4 changed files with 11 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ from app.utils import utc_now
name="process-ses-result", name="process-ses-result",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=Exception, autoretry_for=(Exception,),
) )
def process_ses_results(self, response): def process_ses_results(self, response):
try: try:

View File

@@ -136,7 +136,7 @@ def _deliver_sms_task_handler(func):
name="deliver_sms", name="deliver_sms",
max_retries=48, max_retries=48,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=Exception, autoretry_for=(Exception,),
) )
def deliver_sms(self, notification_id): def deliver_sms(self, notification_id):
"""Branch off to the final step in delivering the notification to sns and get delivery receipts.""" """Branch off to the final step in delivering the notification to sns and get delivery receipts."""
@@ -217,8 +217,8 @@ def _deliver_email_task_handler(func):
name="deliver_email", name="deliver_email",
max_retries=48, max_retries=48,
default_retry_delay=30, default_retry_delay=30,
autoretry_for=Exception, autoretry_for=(Exception,),
dont_autoretry_for=EmailClientNonRetryableException, dont_autoretry_for=(EmailClientNonRetryableException,),
) )
def deliver_email(self, notification_id): def deliver_email(self, notification_id):
try: try:

View File

@@ -57,7 +57,7 @@ def _send_to_service_task_handler(func):
name="send-delivery-status", name="send-delivery-status",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=HTTPError, autoretry_for=(HTTPError,),
) )
def send_delivery_status_to_service(self, notification_id, encrypted_status_update): def send_delivery_status_to_service(self, notification_id, encrypted_status_update):
status_update = encryption.decrypt(encrypted_status_update) status_update = encryption.decrypt(encrypted_status_update)
@@ -90,7 +90,7 @@ def send_delivery_status_to_service(self, notification_id, encrypted_status_upda
name="send-complaint", name="send-complaint",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=HTTPError, autoretry_for=(HTTPError,),
) )
def send_complaint_to_service(self, complaint_data): def send_complaint_to_service(self, complaint_data):
complaint = encryption.decrypt(complaint_data) complaint = encryption.decrypt(complaint_data)

View File

@@ -198,7 +198,7 @@ def _save_task_hander(func):
name="save-sms", name="save-sms",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=SQLAlchemyError, autoretry_for=(SQLAlchemyError,),
) )
def save_sms(self, service_id, notification_id, encrypted_notification, sender_id=None): def save_sms(self, service_id, notification_id, encrypted_notification, sender_id=None):
"""Persist notification to db and place notification in queue to send to sns.""" """Persist notification to db and place notification in queue to send to sns."""
@@ -286,7 +286,7 @@ def save_sms(self, service_id, notification_id, encrypted_notification, sender_i
name="save-email", name="save-email",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=SQLAlchemyError, autoretry_for=(SQLAlchemyError,),
) )
def save_email( def save_email(
self, service_id, notification_id, encrypted_notification, sender_id=None self, service_id, notification_id, encrypted_notification, sender_id=None
@@ -369,7 +369,7 @@ def _save_api_task_handler(func):
name="save-api-email", name="save-api-email",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=SQLAlchemyError, autoretry_for=(SQLAlchemyError,),
) )
def save_api_email(self, encrypted_notification): def save_api_email(self, encrypted_notification):
save_api_email_or_sms(self, encrypted_notification) save_api_email_or_sms(self, encrypted_notification)
@@ -381,7 +381,7 @@ def save_api_email(self, encrypted_notification):
name="save-api-sms", name="save-api-sms",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=SQLAlchemyError, autoretry_for=(SQLAlchemyError,),
) )
def save_api_sms(self, encrypted_notification): def save_api_sms(self, encrypted_notification):
save_api_email_or_sms(self, encrypted_notification) save_api_email_or_sms(self, encrypted_notification)
@@ -453,7 +453,7 @@ def _send_inbound_sms_to_service_handler(func):
name="send-inbound-sms", name="send-inbound-sms",
max_retries=5, max_retries=5,
default_retry_delay=300, default_retry_delay=300,
autoretry_for=RequestException, autoretry_for=(RequestException,),
) )
def send_inbound_sms_to_service(self, inbound_sms_id, service_id): def send_inbound_sms_to_service(self, inbound_sms_id, service_id):
inbound_api = get_service_inbound_api_for_service(service_id=service_id) inbound_api = get_service_inbound_api_for_service(service_id=service_id)