2012-11-28 2 views
0

sqlalchemy와 셀러리 작업자가있는 플라스크 앱이 있습니다. 내 중개인으로 redis를 사용합니다. 누군가 대화에서 새 메시지를 제출할 때마다 작업자가 시작되고 대화에 참여하는 모든 사람들에게 알림 메일을 보내도록되어 있습니다. 따라서 데이터베이스에 연결되어 모든 관련 전자 메일 주소를 가져옵니다.셀러리가 (명백하게) 임의적 인 작업을 잊어 버린 경우 어떻게해야합니까?

셀레 리가 메일을 보내는 작업을 알고 있는지 여부는 불행히도 무작위적인 요인으로 판단됩니다. 일부 시작 후 완벽하게 (때로는) 작동하지만 일부 시작 후에는 전혀 작동하지 않습니다. 그것이 작동하지 않을 때 내가 얻을 오류 : 나는 아직 시스템을 판별 할 수 없습니다

[Tasks] 
    . celery.backend_cleanup 
    . celery.chain 
    . celery.chord 
    . celery.chord_unlock 
    . celery.chunks 
    . celery.group 
    . celery.map 
    . celery.starmap 
    . event.notfiy 
    . messages.sendnotifies 
    . money.checktransaction 
    . money.deploypayment 
    . money.invoicepromotion 
    . protocols.plotweight 
    . questionnaire.deploy 
    . questionnaire.suitability 
    . registration.notify 
    . tracking.track 
    . user.checkaccount 
    . user.checkaccounts 
    . user.fixpermissions 
    . user.genpassreset 

: 내가 --loglevel=DEBUG와 셀러리를 실행하면

[2012-11-28 21:42:58,751: ERROR/MainProcess] Received unregistered task of type 'messages.sendnotifies'. 
The message has been ignored and discarded. 

Did you remember to import the module containing this task? 
Or maybe you are using relative imports? 
Please see http://bit.ly/gLye1c for more information. 

The full contents of the message body was: 
{'retries': 0, 'task': 'messages.sendnotifies', 'eta': None, 'args': [41L], 'expires': None, 'callbacks': None, 'errbacks': None, 'kwargs': {}, 'id': '47da3ba7-ec91-4056-bb4f-a6afec2f960f', 'utc': True} (183b) 
Traceback (most recent call last): 
    File "/var/www/virtual/venv/lib/python2.7/site-packages/celery/worker/consumer.py", line 410, in on_task_received 
    connection = self.connection 
KeyError: 'messages.sendnotifies' 

그것이 비록 작업 목록에서 작업을 나열 그것은 작동하고 그렇지 않을 때. 그러나 모든 관련 패키지를 현재 사용 가능한 최신 버전으로 업그레이드했으며 여전히 작동하지 않습니다.

왜 이것이 작동하지 않을 수 있으며 어떻게 해결할 수 있는지에 대한 아이디어가 있으면 알려 드리겠습니다. 나는 모든 필사적 인 의견을 매우 절실히 받아들입니다.

답변

관련 문제