Add exception to metadata dictionary if job fails for use in after_perfo... #120

Merged
merged 1 commit into from Oct 13, 2012

2 participants

@wesrog

We log our exception data and this seemed like an elegant way to do so. In our case, we wanted to log the exception only if it happened on the first try, so:

@staticmethod
def after_perform(metadata):
    if metadata['failed'] and not metadata['retried']:
        log_error(metadata['exception'])

Thanks for pyres!

@binarydud binarydud merged commit c00c160 into binarydud:master Oct 13, 2012

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment