Some minor refactoring.

- Updated notifications_dao.update_notification_status_by_id with an optional parameter to set the sent_by, this will eliminate a separate update to notifcaitons.
- Added the callback url to the log message, that way we can see if it's the same url failing.
- Stop sending the status callbacks for PENDING status.
This commit is contained in:
Rebecca Law
2018-10-24 11:24:53 +01:00
parent 08caaec0f8
commit 00f04c33c8
5 changed files with 33 additions and 14 deletions

View File

@@ -97,8 +97,9 @@ def _send_data_to_service_callback_api(self, data, service_callback_url, token,
self.retry(queue=QueueNames.RETRY)
except self.MaxRetriesExceededError:
current_app.logger.error(
"Retry: {} has retried the max num of times for notification: {}".format(
"Retry: {} has retried the max num of times for callback url {} and notification_id: {}".format(
function_name,
service_callback_url,
notification_id
)
)