diff --git a/app/celery/tasks.py b/app/celery/tasks.py index 32932b320..290a19a0c 100644 --- a/app/celery/tasks.py +++ b/app/celery/tasks.py @@ -274,10 +274,10 @@ def save_email(self, @notify_celery.task(bind=True, name="save-letter", max_retries=5, default_retry_delay=300) @statsd(namespace="tasks") def save_letter( - self, - service_id, - notification_id, - encrypted_notification, + self, + service_id, + notification_id, + encrypted_notification, ): notification = encryption.decrypt(encrypted_notification) @@ -536,8 +536,9 @@ def send_inbound_sms_to_service(self, inbound_sms_id, service_id): response.raise_for_status() except RequestException as e: current_app.logger.warning( - "send_inbound_sms_to_service request failed for service_id: {} and url: {}. exc: {}".format( + "send_inbound_sms_to_service failed for service_id: {} for inbound_sms_id: {} and url: {}. exc: {}".format( service_id, + inbound_sms_id, inbound_api.url, e ) @@ -547,7 +548,9 @@ def send_inbound_sms_to_service(self, inbound_sms_id, service_id): self.retry(queue=QueueNames.RETRY) except self.MaxRetriesExceededError: current_app.logger.error( - 'Retry: send_inbound_sms_to_service has retried the max number of times for inbound_sms {}'.format( + """Retry: send_inbound_sms_to_service has retried the max number of + times for service: {} and inbound_sms {}""".format( + service_id, inbound_sms_id ) ) @@ -570,7 +573,6 @@ def process_incomplete_jobs(job_ids): def process_incomplete_job(job_id): - job = dao_get_job_by_id(job_id) last_notification_added = dao_get_last_notification_added_for_job_id(job_id)