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.
Optional Arguments:
-h
or --help
Show help message.
-w
or --worker
Full command line to run worker or options that extend the default command line.
-b
or --beat
Full command line to run beat or options that extend the default command line.
-f
or --flower
Full command line to run flower or options that extend the default command line.
-eb
or --exclude-beat
Excludes the beat server at startup.
-ef
or --exclude-flower
Excludes the flower server at startup.
-d
or --debug
Displays information about successful/unsuccessful completion of processes.
To stopped program pressing the keyboard shortcut CTRL+C
Examples of Commands
default commands:
# worker cmd
celery -A <CELERY_APP> worker -E -l INFO -P gevent
# beat cmd
celery -A <CELERY_APP> beat --pidfile=celerybeat.pid -l INFO
# flower cmd
celery --broker=redis://localhost:6379// flower -A <CELERY_APP> --url_prefix=flower
valid commands:
# redefining the -A and -P parameter and adding a new --broker parameter to the default worker command
python manage.py runcelery -w "-A <CELERY_APP> -P solo --broker=redis://localhost:6379//"
# complete replacement of the default worker command with the passed command
python manage.py runcelery -w "celery -A <CELERY_APP> worker"
Working with beat and flower commands works in a similar way.
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.7.tar.gz
.
File metadata
- Download URL: celery_starter-1.0.7.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc32ded422cd5ac4ad77362099489445bb721ec79b11ef806e04e07e1d380447 |
|
MD5 | c6565f969792b71484b4afae4988747a |
|
BLAKE2b-256 | 4ceede1733678cd4b80cb0b1c50bddaf74b51e8a6ceb4e6cb69dfcca3143a7f5 |
File details
Details for the file celery_starter-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: celery_starter-1.0.7-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35a80232676d3ad1cc0c01ade7f426f04cdddb7c840b00fbf3e33e344ade5fd9 |
|
MD5 | ad43d9fbc2b2d4b1cdbac58efc29fbf8 |
|
BLAKE2b-256 | 5992c40c2c75043ff3756b07a7db5e0b6cd9f8d88626c32ed98786656a8de9d7 |