All processing exceptions are now logged
authorJoar Wandborg <git@wandborg.com>
Tue, 31 Jul 2012 23:16:00 +0000 (01:16 +0200)
committerJoar Wandborg <git@wandborg.com>
Tue, 31 Jul 2012 23:16:00 +0000 (01:16 +0200)
All processing exceptions should now be logged, the MediaEntry marked as
failed, the exception re-raised.

mediagoblin/processing/task.py

index 58e36a113f4fd140cf2556b49861e307729375c8..e46d2dfd53136c9342c5a4d7c6c06c8a49d48417 100644 (file)
@@ -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.