We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handler, as it is described in https://docs.celeryq.dev/en/stable/userguide/calling.html#linking-callbacks-errbacks does not work for the following code:
headers = {...} link = signature(process_step_result, options={'headers': headers}) link_error = signature(process_step_error, options={'headers': headers}) app.send_task(step.action.task, link=link, link_error=link_error, headers=headers)
When I use error function signature as proposed in documentation I get:
TypeError: process_step_error() missing 2 required positional arguments: 'exc' and 'traceback'
When I switch to older variant:
@app.task def process_step_error(task_id): result = app.AsyncResult(task_id) result.get(propagate=False)
I get Never call result.get() within a task error meaning that is is NOT called directly, as also stated in documentation.
Never call result.get() within a task
When I add allow_join_result:
allow_join_result
@app.task def process_step_error(task_id): with allow_join_result(): result = app.AsyncResult(task_id) result.get(propagate=False)
I can reach the result
I use: Celery v5.4.0 Python 3.12 Redis as transport and results database
Either support for link_error in send_task should be documented separately or implementation fixed.
link_error
send_task
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Checklist
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the main branch.
(If there are none, check this box anyway).
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Description
Error handler, as it is described in https://docs.celeryq.dev/en/stable/userguide/calling.html#linking-callbacks-errbacks does not work for the following code:
When I use error function signature as proposed in documentation I get:
When I switch to older variant:
I get
Never call result.get() within a task
error meaning that is is NOT called directly, as also stated in documentation.When I add
allow_join_result
:I can reach the result
I use:
Celery v5.4.0
Python 3.12
Redis as transport and results database
Suggestions
Either support for
link_error
insend_task
should be documented separately or implementation fixed.The text was updated successfully, but these errors were encountered: