def on_task_retry(**kwargs): blueox.set('result_state', states.RETRY) blueox.set('exception', "".join( traceback.format_exception(*kwargs['einfo'].exc_info))) # Retry path doesn't call 'postrun'. I think in celery-speak, it's the same # task, but we want to track attempts. ctx = current_context() if ctx: ctx.done()
def on_task_retry(**kwargs): blueox.set('result_state', states.RETRY) blueox.set('exception', "".join(traceback.format_exception(*kwargs['einfo'].exc_info))) # Retry path doesn't call 'postrun'. I think in celery-speak, it's the same # task, but we want to track attempts. ctx = current_context() if ctx: ctx.done()
def on_task_postrun(**kwargs): blueox.set('result_state', str(kwargs['state'])) ctx = current_context() if ctx: ctx.done()
def my_function(value): blueox.set('value', value) self.context = context.current_context() return True