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': {}})