Permalink
Browse files

Merge pull request #120 from discogs/exception-metadata

Add exception to metadata dictionary if job fails for use in after_perfo...
  • Loading branch information...
binarydud committed Oct 13, 2012
2 parents 017f305 + b073ac0 commit c00c1607325b2c57bde39dfa633747f492942fb2
Showing with 2 additions and 1 deletion.
  1. +2 −1 pyres/job.py
View
@@ -81,9 +81,10 @@ def perform(self):
if before_perform:
payload_class.before_perform(metadata)
return payload_class.perform(*args)
- except:
+ except Exception as e:
check_after = False
metadata["failed"] = True
+ metadata["exception"] = e
if not self.retry(payload_class, args):
metadata["retried"] = False
raise

0 comments on commit c00c160

Please sign in to comment.