2014-01-24 1 views
0

그래서 현재 설치된 셀러리 3.1.8 (Cipater)와 Djcelery 3.1.1하지만 자습서를 수행하면 내 사이트의 원인이현재 버전은 호환

그래서이 튜토리얼 충돌하지 않는 것 http://docs.celeryproject.org/en/master/django/first-steps-with-django.html#django-first-steps

나는 꽤 많이 수행하지만 settings.py

import djcelery 

이 라인 장고 - 셀러리를 수입하려고 할 때 서버 오류가 발생합니다. 오류 로그를 보면

[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] mod_wsgi (pid=32567): Exception occurred processing WSGI script '/srv/www/site/app1/wsgi_app1.py'. 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] Traceback (most recent call last): 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi_app1.py", line 236, in __call__ 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120]  self.load_middleware() 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120]  for middleware_path in settings.MIDDLEWARE_CLASSES: 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__ 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120]  self._setup(name) 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120]  self._wrapped = Settings(settings_module) 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__ 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120]  raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) 
[Fri Jan 24 00:47:40 2014] [error] [client 24.61.15.120] ImportError: Could not import settings 'site.settings_app1' (Is it on sys.path?): cannot import name Celery 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] mod_wsgi (pid=32567): Exception occurred processing WSGI script '/srv/www/site/app1/wsgi_app1.py'. 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] Traceback (most recent call last): 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi_app1.py", line 236, in __call__ 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120]  self.load_middleware() 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120]  for middleware_path in settings.MIDDLEWARE_CLASSES: 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__ 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120]  self._setup(name) 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120]  self._wrapped = Settings(settings_module) 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__ 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120]  raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) 
[Fri Jan 24 00:47:41 2014] [error] [client 24.61.15.120] ImportError: Could not import settings 'site.settings_app1' (Is it on sys.path?): cannot import name Celery 

나는 계속 나아갈 방법을 모르겠다. 즉, 수입은 문제의 원인이 무엇을 말 그대로 내가 장고 백엔드 물건을 활용하는 djcelery를 사용할 필요가

편집 :

난 당신이 대부분의 것들에 대한하지만 릴리스의 djcelery을 필요로하지 않는다는 것을 알고 있어요 그것이 말하는 3.1 노트 http://docs.celeryproject.org/en/master/whatsnew-3.1.html#django-supported-out-of-the-box

일부 기능은 여전히 ​​장고 - 셀러리 라이브러리 필요합니다

Celery does not implement the Django database or cache result backends. 

    Celery does not ship with the database-based periodic task 

     scheduler. 

을 그리고 난 내 DB를 사용하려면 백엔드로

답변

0

글쎄, 아직 문제가 있지만 DB 저장을 허용하기 위해 실제로 장고 셀러리가 필요 없다는 것을 배웠으므로이 답변을 고려해 볼 것입니다.

관련 문제