- wrap apply_async parameter notification_id in a str() argument

- check if service_callback_api exist before putting tasks on queue
- create_service_callback_api in tests before asserting if send_delivery_status_to_service has been called.
This commit is contained in:
venusbb
2017-12-04 14:48:23 +00:00
parent 771ce9e2bc
commit 5482ee4fe7
10 changed files with 48 additions and 21 deletions

View File

@@ -58,7 +58,7 @@ def send_delivery_status_to_service(self, notification_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_delivery_status_to_service request failed for service_id: {} and url: {}. exc: {}".format(
notification_id,
service_callback_api.url,
e
@@ -68,4 +68,4 @@ def send_delivery_status_to_service(self, notification_id):
try:
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
current_app.logger.exception('Retry: send_inbound_sms_to_service has retried the max number of times')
current_app.logger.exception('Retry: send_delivery_status_to_service has retried the max number of times')