2017-09-21 3 views
5

셀러리 데몬에 꽃을 더할 수 있습니까?셀러리 데몬에 꽃을 추가 하시겠습니까?

아래는 CelerYD_OPTS 변수에 flower config를 추가했지만 실패했습니다.

또는 설정 파일에 추가하여 셀라리와 함께 꽃을 피울 수있는 또 다른 명령이 있습니까?

# 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 
+0

'celery_opts'는 다른 프로세스를 실행하는 것이 확실하지 않습니다. (올바르게 이해하면 꽃이 나옵니다. 설정을 사용하여 가져 오더라도 잘못된 것입니다. 둘 다 시작하는 스크립트를 만들 수 있습니까?) –

+0

꽃을 만들기 위해 다른 데몬 프로세스가 필요합니까? 어떻게 해야할지 잘 모르겠습니다. 셀러리 용으로이 가이드를 따랐습니다. https://pythad.github.io/articles/ 2016-12/how-to-run-a-daemon-in-production. 셀러리를 찾을 수 없다. – AlexW

+0

나는 이것을 다음과 같이 봤다. https://github.com/mher/flower/issues/ 28 그러나 아마도 Google은 꽃을 시작하는 방법을 별도의 프로세스와 서버이기 때문에 –

답변

1

차라리 OS init 스크립트보다 supervisord 또는 other process control system로 실행하고 시작 - 중지 - 데몬을하는 것이 좋습니다.

작업자와 꽃은 모두 many docs on how to run celery worker with supervisord이고 실행 꽃은 다른 프로그램 섹션을 추가하기 만하면됩니다. 작업자 명령을 celery flower -A itapp --ports 5555 --time-limit=300 --concurrency=8과 같은 해당 꽃 실행 명령으로 바꿉니다.

+0

메신저는 현재 슈퍼 바이어가 지원하지 않는 파이썬 3을 사용합니다. – AlexW

+0

바이너리 실행 파일로 supercisord 실행 프로그램, 파이썬 2 또는 3과 아무 관련이 없습니다. 너는 할 수있어. ck를 init과 함께 사용하면 꽃을 독립 실행 형 데몬으로 유지할 수 있습니다. – georgexsh