Skip to content
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

Provide docs about usage of celery beat with Saleor #1364

Open
korycins opened this issue Oct 17, 2024 · 0 comments
Open

Provide docs about usage of celery beat with Saleor #1364

korycins opened this issue Oct 17, 2024 · 0 comments

Comments

@korycins
Copy link
Member

Finding the proper way of running the celery beat can be problematic, as we have tasks with custom schedulers (like handle-promotion-toggle).

In my case using PersistentScheduler caused that some tasks were called only once or twice. Using beat with django_celery_beat.schedulers:DatabaseScheduler caused the task with the custom scheduler were skipped and never called.

In Saleor code, we have our own DatabaseScheduler: scheduler saleor.schedulers.schedulers.DatabaseScheduler. AFAIK this one should be recommended to use.

Running beat with command like below:
celery --app saleor.celeryconf:app beat --scheduler saleor.schedulers.schedulers.DatabaseScheduler

will turn on the proper scheduler that is able to handle tasks like handle-promotion-toggle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant