Django command to launch celery worker, beat, flower
Project description
Django command to run celery (worker, beat, flower)
with automatically reboot server after changing files
Install
-
Install package
pip install celery-starter
-
Add app name to
INSTALLED_APPS
INSTALLED_APPS = [ 'celery_starter', ]
Command to run the program:
python manage.py runcelery
Arguments can be passed in any order, it doesn't matter.
Positional Arguments:
<celery app name>
or
<"full command to run celery worker">
Optional Arguments:
-h
or --help
Show help message.
-b
or --beat
Excludes the beat server at startup.
-f
or --flower
Excludes the flower server at startup.
-d
or --debug
Displays information about successful/unsuccessful completion of processes.
-ll
or --loglevel
Defines the logging level for celery worker/beat
-lf
or --logfile
Redirects the output to the console by default to a log file for celery worker/beat
To stopped program pressing the keyboard shortcut CTRL+C
Examples of Commands
The command enclosed in quotation marks gets into the positional arguments and replaces the command to run the default celery worker.
The --beat
--flower
commands fall into the optional arguments and turn off the beat and flower of the server.
python manage.py runcelery "celery --app=${CELERY_APP} worker -E \
--hostname=worker-example@%h
--uid=nobody --gid=nogroup \
--loglevel=INFO" --beat --flower
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for celery_starter-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d66007d43cf415a119872b2d21722c4274bcb305eb394fcfc03da0dd074d9d0 |
|
MD5 | b9df4f820e03f240b639f97d8b7f144a |
|
BLAKE2b-256 | 6b7273dd2ac75c7f589d41a1544655e84d14b16f9122ff4127066f26f8e7ee79 |