New issue
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
How to use a group periodically - missing documentation #8909
Comments
Where in documentation is that indication? |
https://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html This shows how to add a single periodic task. |
You can't. Groups/Chords/Chains and others are part of what is called workflows of tasks [0]. beat schedules are designed to initiate a individual task as far as I know. It's very much possible to use initiating tasks to kick start your workflows: @task
def op_workflow_a():
from celery import group
from my_app.tasks import send_email
emails = ["[email protected]", "[email protected]"]
group_task = group(send_email.s(email=email) for email in emails)
group_result = group_task.apply_async()
return group_result.id [0] https://docs.celeryq.dev/en/stable/userguide/canvas.html#groups |
That is already what I'm doing. However, after the |
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
In the documentation, there is indication on how to add a single periodic task but I didn't find any indication on how to schedule a periodic group.
Doing
sender.add_periodic_task(10, my_group, name='group task name')
raises an exception.So I ended up creating one main task that spawns many subtasks, which is discouraged in the docs:
Suggestions
Provide information on how to schedule a group job periodically.
The text was updated successfully, but these errors were encountered: