Add instuction to run celery beat (#4162)

* add instuction to run celery beat

* Extend explanations for celery beat

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
Hoai-Thu Vuong 2023-02-25 19:09:52 +07:00 committed by GitHub
parent ad1edba711
commit b74af5b1d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,20 @@ celery -A config.celery_app worker -l info
Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right.
To run [periodic tasks](https://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html), you'll need to start the celery beat scheduler service. You can start it as a standalone process:
``` bash
cd {{cookiecutter.project_slug}}
celery -A config.celery_app beat
```
or you can embed the beat service inside a worker with the `-B` option (not recommended for production use):
``` bash
cd {{cookiecutter.project_slug}}
celery -A config.celery_app worker -B -l info
```
{%- endif %}
{%- if cookiecutter.use_mailhog == "y" %}