Added a new exception type for DVLAException.

The Notify team needs to investigate when a notification is marked as failed.
We will process the whole file and mark the notifications with the appropriate status, if any are failed an exception is raised.
The exception will trigger a cloud watch error for the team to investigate.
This commit is contained in:
Rebecca Law
2018-02-22 15:05:37 +00:00
parent 01ed4e1e56
commit 385653af44
4 changed files with 56 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ def make_task(app):
def on_failure(self, exc, task_id, args, kwargs, einfo):
# ensure task will log exceptions to correct handlers
app.logger.exception('Celery task failed')
app.logger.exception('Celery task: {} failed'.format(self.name))
super().on_failure(exc, task_id, args, kwargs, einfo)
def __call__(self, *args, **kwargs):