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
File details
Details for the file celery_starter-1.0.1.tar.gz
.
File metadata
- Download URL: celery_starter-1.0.1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da8c5196fc1a7ec56eb8541fb784d551f10af1a23237b85991317ee32bc0cbaf |
|
MD5 | 916acc064d5147de63a9ec902975e368 |
|
BLAKE2b-256 | 70374638743f405b971d4bb582cefb19541cb40be9965db6145390e1bcb6b7f7 |
File details
Details for the file celery_starter-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: celery_starter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556869ed6a0f7f60e430087e906a141167ee297c62e3c7f3933ebb6656da2d85 |
|
MD5 | d910314b271ac2b60566d5396da5affb |
|
BLAKE2b-256 | c96fb697c8b6717a2bee1a3d15115ce4e7919eb856c9b6029c03911849a845fc |