|
@@ -144,12 +144,11 @@ This is an example error callback:
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
- @app.task
|
|
|
- def error_handler(uuid):
|
|
|
- result = AsyncResult(uuid)
|
|
|
- exc = result.get(propagate=False)
|
|
|
+ @app.task(bind=True)
|
|
|
+ def error_handler(self, uuid):
|
|
|
+ result = self.app.AsyncResult(uuid)
|
|
|
print('Task {0} raised exception: {1!r}\n{2!r}'.format(
|
|
|
- uuid, exc, result.traceback))
|
|
|
+ uuid, result.result, result.traceback))
|
|
|
|
|
|
it can be added to the task using the ``link_error`` execution
|
|
|
option:
|