changed the way we save information about exceptions
This commit is contained in:
parent
4dd814a945
commit
e3663c7be1
@ -325,14 +325,12 @@ def mark_entry_failed(entry_id, exc):
|
|||||||
u'fail_metadata': exc.metadata})
|
u'fail_metadata': exc.metadata})
|
||||||
else:
|
else:
|
||||||
_log.warn("No idea what happened here, but it failed: %r", exc)
|
_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
|
# Looks like no, let's record it so that admin could ask us about the
|
||||||
# failure_error (we'll assume it wasn't handled) and don't record
|
# reason
|
||||||
# metadata (in fact overwrite it if somehow it had previous info
|
|
||||||
# here)
|
|
||||||
atomic_update(mgg.database.MediaEntry,
|
atomic_update(mgg.database.MediaEntry,
|
||||||
{'id': entry_id},
|
{'id': entry_id},
|
||||||
{u'state': u'failed',
|
{u'state': u'failed',
|
||||||
u'fail_error': None,
|
u'fail_error': u'Unhandled exception: {0}'.format(unicode(exc)),
|
||||||
u'fail_metadata': {}})
|
u'fail_metadata': {}})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user