2017-09-21 23 views
5

क्या अजवाइन के डिमन में फूल जोड़ना संभव है?सेलेरी डिमन में फूल जोड़ना?

नीचे मेरी सेलरी कॉन्फ़िगरेशन फ़ाइल है, मैंने CELERYD_OPTS चर में जोड़ा फूल कॉन्फ़िगर करने का प्रयास किया लेकिन यह असफल रहा है।

या क्या कोई अन्य कमांड है जिसे मैं कॉन्फ़िगरेशन फ़ाइल में जोड़ सकता हूं ताकि फूल मिल सके और अजवाइन के साथ चल सकें?

# 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/कैसे-से-रन-सेलेरी-ए-डिमन-इन-प्रोडक्शन। और मुझे अजवाइन – AlexW

+0

के लिए कोई नहीं मिल रहा है, मैंने इसे googled: https://github.com/mher/flower/issues/ 28 लेकिन शायद फूल कैसे शुरू करें, क्योंकि यह एक अलग प्रक्रिया और सर्वर है। –

उत्तर

1

मैं बजाय ओएस 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

सुपरसीसॉर्ड रन प्रोग्राम बाइनरी निष्पादन योग्य के रूप में समर्थित नहीं है, हालांकि अजगर 2 या 3 के साथ कुछ भी नहीं है, हालांकि, आप sti कर सकते हैं init के साथ सीके, सिर्फ विचार स्टैंड फूल एक स्टैंडअलोन डेमॉन के रूप में पकड़ो। – georgexsh

संबंधित मुद्दे