मैं अपने उत्पादन सर्वर में अजवाइन का एक साधारण उदाहरण तैनात करने की कोशिश कर रहा हूं, मैंने अजवाइन के रूप में अजवाइन चलाने के बारे में अजवाइन वेबसाइट में ट्यूटोरियल का पालन किया है http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#daemonizing , और मैं /etc/default में कॉन्फ़िग फ़ाइल/celeryddjango/अजवाइन - अजवाइन की स्थिति: त्रुटि: कोई नोड्स समय बाधा के भीतर उत्तर दिया
1 # Name of nodes to start 2 # here we have a single node 3 CELERYD_NODES="w1" 4 # or we could have three nodes: 5 #CELERYD_NODES="w1 w2 w3" 6 7 # Where to chdir at start. 8 CELERYD_CHDIR="/home/audiwime/cidec_sw" 9 10 # Python interpreter from environment. 11 ENV_PYTHON="/usr/bin/python26" 12 13 # How to call "manage.py celeryd_multi" 14 CELERYD_MULTI="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryd_multi" 15 16 # # How to call "manage.py celeryctl" 17 CELERYCTL="$ENV_PYTHON $CELERYD_CHDIR/manage.py celeryctl" 18 19 # Extra arguments to celeryd 20 CELERYD_OPTS="--time-limit=300 --concurrency=8" 21 22 # Name of the celery config module. 23 CELERY_CONFIG_MODULE="celeryconfig" 24 25 # %n will be replaced with the nodename. 26 CELERYD_LOG_FILE="/var/log/celery/%n.log" 27 CELERYD_PID_FILE="/var/run/celery/%n.pid" 28 29 # Workers should run as an unprivileged user. 30 CELERYD_USER="audiwime" 31 CELERYD_GROUP="audiwime" 32 33 export DJANGO_SETTINGS_MODULE="cidec_sw.settings"
मिला लेकिन अगर मैं टर्मिनल में
celery status
चलाने के लिए, मैं इस प्रतिक्रिया मिली:
012,351,Error: No nodes replied within time constraint
मैं मैं
python26 manage.py celeryd -l info
चला सकते हैं और Django में अपने कार्यों ठीक से चलाने के https://github.com/celery/celery/tree/3.0/extra/generic-init.d/
/etc/init.d/celeryd restart celeryd-multi v3.0.12 (Chiastic Slide) > w1.one.cloudwime.com: DOWN > Restarting node w1.one.cloudwime.com: OK
में प्रदान की celeryd स्क्रिप्ट के माध्यम से अजवाइन पुनः आरंभ कर सकते, लेकिन अगर मैं जाने डेमॉन अपना कार्य करने मुझे कोई परिणाम नहीं मिलते हैं, /var/log/celery/w1.log
मुझे त्रुटियां भी नहीं मिलतीं क्योंकि मैं इस
from celery import current_app
def call_celery_delay(request):
print current_app.tasks
run.delay(request.GET['age'])
return HttpResponse(content="celery task set",content_type="text/html")
किया मेरे कार्य पंजीकृत किया गया है और मैं जिसमें एक शब्दकोश मिल मेरे कार्य दिखाई
{'celery.chain': <@task: celery.chain>, 'celery.chunks': <@task: celery.chunks>, 'celery.chord': <@task: celery.chord>, 'tasks.add2': <@task: tasks.add2>, 'celery.chord_unlock': <@task: celery.chord_unlock>, **'tareas.tasks.run': <@task: tareas.tasks.run>**, 'tareas.tasks.add': <@task: tareas.tasks.add>, 'tareas.tasks.test_two_minute': <@task: tareas.tasks.test_two_minute>, 'celery.backend_cleanup': <@task: celery.backend_cleanup>, 'celery.map': <@task: celery.map>, 'celery.group': <@task: celery.group>, 'tareas.tasks.test_one_minute': <@task: tareas.tasks.test_one_minute>, 'celery.starmap': <@task: celery.starmap>}
लेकिन उस के अलावा मैं अपने काम में कोई त्रुटि से और कुछ नहीं मिलता है, कोई परिणाम लॉग, कुछ भी नहीं। क्या कोई मुझे बता सकता है कि क्या गलत हो सकता है? आप कर रहे हैं मेरी ही उम्मीद ...
का उपयोग करके इसे पुनरारंभ करें, मुझे नहीं लगता कि आपको 'सेलेरीबीट' और 'सेलेरीड' दोनों की आवश्यकता है। आप 'सेलेरीड-बी' चला सकते हैं, जो वही है। मैं अभी भी बहुत उत्सुक हूं कि आपको 'सेवा सेलेरीड' कैसे मिला? (पीएस।मुझे अभी भी यह त्रुटि मिलती है) – Houman
@ सहेजें यह त्रुटि मुख्य रूप से तब आती है जब सभी फ़ाइल अनुमतियां सही नहीं होतीं –
@AkashDeshpande आपकी प्रतिक्रिया के लिए धन्यवाद। कृपया आप बहुत दयालु हो और इस पेस्ट पर नज़र डालें: http://pastebin.com/e3GK4eax इस प्रकार मैंने अनुमतियों को सेट अप किया है, क्या आप ऑर्डर के बाहर कुछ भी स्पष्ट देखते हैं? – Houman