Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding flower to celery daemon?

Is it possible to add flower to the celery daemon?

Below is my celery config file, I tried added flower config to the CELERYD_OPTS variable but it has failed.

or is there another command I can add to the config file to get flower up and running 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 (e.g., 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
like image 886
AlexW Avatar asked Sep 21 '17 16:09

AlexW


People also ask

How does flower work Celery?

It can be used as a bucket where programming tasks can be dumped. The program that passed the task can continue to execute and function responsively. The Celery Flower is a tool for monitoring your celery tasks and workers. It's web based and allows you to see task progress, details, worker status.

How do you start a Celery flower?

Celery Flower in Docker Let's add our flower service here. This instructs docker compose to run our flower on port 9090 and open the port for us to access it. Run this command to start your project. When all services are up you can open http://127.0.0.1:9090/ and see celery flower interface.

What is MHER flower?

branch=master :target: https://travis-ci.org/mher/flower. Flower is a web based tool for monitoring and administrating Celery clusters.

What is flower in airflow?

Flower is a web based tool for monitoring and administrating Celery clusters. This topic describes how to configure Airflow to secure your flower instance. This is an optional component that is disabled by default in Community deployments and you need to configure it on your own if you want to use it.


1 Answers

I suggest run them with supervisord or other process control system, rather than OS init script and start-stop-daemon.

Both worker and flower should run as daemon process side by side, there are many docs on how to run celery worker with supervisord, run flower is simply to add another program section, replace worker command with corresponding flower launching command like celery flower -A itapp --ports 5555 --time-limit=300 --concurrency=8.

like image 91
georgexsh Avatar answered Oct 21 '22 21:10

georgexsh