diff options
author | Joar Wandborg <git@wandborg.com> | 2012-08-01 01:16:00 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-08-01 01:16:00 +0200 |
commit | 2891b2c6d0526f0faab78f182d3d084717e7691e (patch) | |
tree | 0e65da26a5685f2c676c2ec246735804ae94a5f3 /mediagoblin/processing | |
parent | 65a2eb66946a5a8d940b5654035180d36f18ed4c (diff) | |
download | mediagoblin-2891b2c6d0526f0faab78f182d3d084717e7691e.tar.lz mediagoblin-2891b2c6d0526f0faab78f182d3d084717e7691e.tar.xz mediagoblin-2891b2c6d0526f0faab78f182d3d084717e7691e.zip |
All processing exceptions are now logged
All processing exceptions should now be logged, the MediaEntry marked as
failed, the exception re-raised.
Diffstat (limited to 'mediagoblin/processing')
-rw-r--r-- | mediagoblin/processing/task.py | 8 |
1 files changed, 8 insertions, 0 deletions
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. |