You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the commit log
to find out if the bug was already fixed in the main branch.
I have included all related issues and possible duplicate issues
in this issue (If there are none, check this box anyway).
I have tried to reproduce the issue with pytest-celery and added the reproduction script below.
Mandatory Debugging Information
I have included the output of celery -A proj report in the issue.
(if you are not able to do this, then at least specify the Celery
version affected).
I have verified that the issue exists against the main branch of Celery.
I have included the contents of pip freeze in the issue.
I have included all the versions of all the external dependencies required
to reproduce this bug.
Optional Debugging Information
I have tried reproducing the issue on more than one Python version
and/or implementation.
I have tried reproducing the issue on more than one message broker and/or
result backend.
I have tried reproducing the issue on more than one version of the message
broker and/or result backend.
I have tried reproducing the issue on more than one operating system.
I have tried reproducing the issue on more than one workers pool.
[ x I have tried reproducing the issue with autoscaling, retries,
ETA/Countdown & rate limits disabled.
I have tried reproducing the issue after downgrading
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
None
Possible Duplicates
None
Behavior
My goal is to launch a chord from a FastAPI call, which creates N different Tasks to be executed, then not waiting for it to complete, just returning Response 200. To do so I first used the following notation:
header= [exec_calc.s(x) forxinargs]
callback=do_checks.si() # no need for header results as argument herechord(header)(callback)
Unfortunately it resulted in exploding FastAPI process and no return since chord completion, not desired. So I used this other notation hoping for a different ending:
header= [exec_calc.s(x) forxinargs]
callback=do_checks.si() # no need for header results as argument herechord(header, callback).async()
But still, same behavior happening: FastAPI process exploding and nothing returned.
It's not very clear to me how chord should be used and if they can actually be used asynchronously or not. Maybe there's some specific behavior not properly described in their documentation.
The text was updated successfully, but these errors were encountered:
This line chord(header, callback).async() is almost correct, however, chord does not define such method as async(). Use delay() or apply_async() instead. For example, that's how i used chord in combination with chain:
chord(
run_vm_playbooks, # Will run in parallel
chain(
terraform.refresh.si(),
start_cloned_sandbox.si(),
),
).delay()
If you call chord object chord(...)(), you program will wait until it finishes the execution. Use one of those methods, mentioned earlier, depending on your requirements.
Thanks for the prompt feedback!
However .async() was actually a typo, I used .apply_async() in the second case but still it wasn't working as expected.
In particular header is a very big list (len(args) > 1.000.000) of exec_calc() tasks which should be run asynchronously then called back by callback.
I was expecting the group part of it running asynchronously as if been called by group(..).apply_async(), but it seems like it got stuck for some reason. Am I missing something?
Checklist
main
branch of Celery.contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the main branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj report
in the issue.(if you are not able to do this, then at least specify the Celery
version affected).
main
branch of Celery.pip freeze
in the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Behavior
My goal is to launch a chord from a FastAPI call, which creates N different Tasks to be executed, then not waiting for it to complete, just returning Response 200. To do so I first used the following notation:
Unfortunately it resulted in exploding FastAPI process and no return since chord completion, not desired. So I used this other notation hoping for a different ending:
But still, same behavior happening: FastAPI process exploding and nothing returned.
It's not very clear to me how chord should be used and if they can actually be used asynchronously or not. Maybe there's some specific behavior not properly described in their documentation.
The text was updated successfully, but these errors were encountered: