changed the way we save information about exceptions
authorBoris Bobrov <breton@cynicmansion.ru>
Mon, 11 Aug 2014 16:59:35 +0000 (20:59 +0400)
committerBoris Bobrov <breton@cynicmansion.ru>
Thu, 28 Jan 2016 21:04:44 +0000 (22:04 +0100)
mediagoblin/processing/__init__.py

index aa8f1447aeb9859147b3fbd45e68bd6eabf6d11c..112b9d359610011dcd5c2080e15563fb5e550c17 100644 (file)
@@ -325,14 +325,12 @@ def mark_entry_failed(entry_id, exc):
              u'fail_metadata': exc.metadata})
     else:
         _log.warn("No idea what happened here, but it failed: %r", exc)
-        # Looks like no, so just mark it as failed and don't record a
-        # failure_error (we'll assume it wasn't handled) and don't record
-        # metadata (in fact overwrite it if somehow it had previous info
-        # here)
+        # Looks like no, let's record it so that admin could ask us about the
+        # reason
         atomic_update(mgg.database.MediaEntry,
             {'id': entry_id},
             {u'state': u'failed',
-             u'fail_error': None,
+             u'fail_error': u'Unhandled exception: {0}'.format(unicode(exc)),
              u'fail_metadata': {}})