Adding flowers to a celery demon?

Can a flower be added to a celery demon?

Below is my celery configuration file, I tried adding the color configuration to the CELERYD_OPTS variable, but it failed.

or is there another command that I can add to the configuration file to get the flower and work with celery?

# Names of nodes to start # most people will only start one node: CELERYD_NODES="worker1" # but you can also start multiple and configure settings # for each in CELERYD_OPTS #CELERYD_NODES="worker1 worker2 worker3" # alternatively, you can specify the number of nodes to start: #CELERYD_NODES=10 # Absolute or relative path to the 'celery' command: CELERY_BIN="/usr/local/bin/celery" # App instance to use # comment out this line if you don't use an app CELERY_APP="itapp" # or fully qualified: #CELERY_APP="proj.tasks:app" # Where to chdir at start. CELERYD_CHDIR="/itapp/itapp/" # Extra command-line arguments to the worker CELERYD_OPTS="flower --ports 5555 --time-limit=300 --concurrency=8" # Configure node-specific settings by appending node name to arguments: #CELERYD_OPTS="--time-limit=300 -c 8 -c:worker2 4 -c:worker3 2 -Ofair:worker1" # Set logging level to DEBUG #CELERYD_LOG_LEVEL="DEBUG" # %n will be replaced with the first part of the nodename. CELERYD_LOG_FILE="/var/log/celery/%n%I.log" CELERYD_PID_FILE="/var/run/celery/%n.pid" # Workers should run as an unprivileged user. # You need to create this user manually (or you can choose # a user/group combination that already exists (eg, nobody). CELERYD_USER="celery" CELERYD_GROUP="celery" # If enabled pid and log directories will be created if missing, # and owned by the userid/group configured. CELERY_CREATE_DIRS=1 
+5
source share
1 answer

I suggest launching them using supervisord or another process control system , rather than an OS init script and start-stop-daemon.

Both the worker and the flower should work as a daemon process side by side, there are many documents on how to start a celery worker with supervisord , start a flower just adds another section of the program, replace the worker command with the corresponding flower start command, for example celery flower -A itapp --ports 5555 --time-limit=300 --concurrency=8 .

+1
source

Source: https://habr.com/ru/post/1272019/


All Articles