我有一個項目在dev VM'ubuntu/trusty'下。 我用的virtualenv與以下軟件包:以項目名稱作爲命令行參數啓動芹菜發出錯誤
celery 3.1.23
eventlet 0.18.4
django 1.8.15
Python版本3.4.3是。
當我開始以這種方式芹菜工人:
celery worker --loglevel=INFO -P eventlet -c 3 -Q default -E -n default.queue -l INFO
它正確地啓動,但是所有的任務留在「掛起」狀態。
當我開始是這樣(與項目的名稱'-A'參數):
celery worker -A meridian --loglevel=INFO -P eventlet -c 3 -Q default -E -n default.queue -l INFO
它發出了一個錯誤:
(meridian)[email protected]:/vagrant/meridian/meridian$ celery worker -A meridian --loglevel=INFO -P eventlet -c 3 -Q default -E -n default.queue -l INFO
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/app/utils.py", line 241, in find_app
found = sym.app
AttributeError: 'module' object has no attribute 'app'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/meridian/bin/celery", line 11, in <module>
sys.exit(main())
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/__main__.py", line 30, in main
main()
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/bin/celery.py", line 81, in main
cmd.execute_from_commandline(argv)
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/bin/celery.py", line 793, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/bin/base.py", line 309, in execute_from_commandline
argv = self.setup_app_from_commandline(argv)
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/bin/base.py", line 469, in setup_app_from_commandline
self.app = self.find_app(app)
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/bin/base.py", line 489, in find_app
return find_app(app, symbol_by_name=self.symbol_by_name)
File "/home/vagrant/.virtualenvs/meridian/lib/python3.4/site-packages/celery/app/utils.py", line 246, in find_app
found = sym.celery
AttributeError: 'module' object has no attribute 'celery'
有誰知道如何解決?
謝謝,但我不確定你在'同一個virtualenv'中安裝你的項目是什麼意思。 virtualenv創建特殊的目錄包含所需的python庫和/或特定的python版本,不是嗎?我如何在那裏「安裝」項目? –
請參閱上面的更新 – temoto