From 2891b2c6d0526f0faab78f182d3d084717e7691e Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Wed, 1 Aug 2012 01:16:00 +0200 Subject: [PATCH] All processing exceptions are now logged All processing exceptions should now be logged, the MediaEntry marked as failed, the exception re-raised. --- mediagoblin/processing/task.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mediagoblin/processing/task.py b/mediagoblin/processing/task.py index 58e36a11..e46d2dfd 100644 --- a/mediagoblin/processing/task.py +++ b/mediagoblin/processing/task.py @@ -71,6 +71,14 @@ class ProcessMedia(Task): mark_entry_failed(entry._id, exc) + except Exception as exc: + _log.error('An unhandled exception was raised while' + + ' processing {0}'.format( + entry)) + + mark_entry_failed(entry._id, exc) + raise + def on_failure(self, exc, task_id, args, kwargs, einfo): """ If the processing failed we should mark that in the database. -- 2.25.1