Skip to content

Commit b073ac0

Browse files
author
Wes Rogers
committed
Add exception to metadata dictionary if job fails for use in after_perform
1 parent 017f305 commit b073ac0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyres/job.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ def perform(self):
8181
if before_perform:
8282
payload_class.before_perform(metadata)
8383
return payload_class.perform(*args)
84-
except:
84+
except Exception as e:
8585
check_after = False
8686
metadata["failed"] = True
87+
metadata["exception"] = e
8788
if not self.retry(payload_class, args):
8889
metadata["retried"] = False
8990
raise

0 commit comments

Comments
 (0)