2012-09-13 18 views
5

Sto tentando di eseguire attività che sono nella memoria. compiti registerd su lavoratoreha ricevuto l'attività non registrata di tipo

[2012-09-13 11:10:18,928: WARNING/PoolWorker-1] [u'B.run', u'M1.run', u'M11.run', u'M22.run', u'M23.run', u'M24.run', u'M25.run', u'M26.run', u'M4.run', u'celery.backend_cleanup', u'celery.chain', u'celery.chord', u'celery.chord_unlock', u'celery.chunks', u'celery.group', u'celery.map', u'celery.starmap', u'impmod.run', u'initializerNew.run'] 

ma dà ancora errori:

[2012-09-13 11:19:59,848: ERROR/MainProcess] Received unregistered task of type 'M24.run'. 
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': 'M24.run', 'eta': None, 'args': [{'cnt': '3', 'ids': '0001-0004,0002-0004', 'NagID': 2, 'wgt': '3', 'ModID': 'M24', 'ProfileModuleID': 64, 'mhs': '1'}, 0], 'expires': None, 'callbacks': None, 'errbacks': None, 'kwargs': {}, 'id': 'ddf5f520-803b-4dc9-ad3b-a931d90950a6', 'utc': True} (394b) 

Traceback (most recent call last): 
    File "/usr/local/lib/python2.7/dist-packages/celery-3.0.4-py2.7.egg/celery/worker/consumer.py", line 410, in on_task_received 
    strategies[name](message, body, message.ack_log_error) 
KeyError: 'M24.run' 

risposta

0

Puoi allegare comando che avvia sedano? Sembra che questa applicazione abbia un diverso percorso sys.path, ecco perché l'app di celery non ha potuto importare l'attività "M24.run".

Inoltre, è necessario ricordare che Celery richiede l'impostazione dei nomi dei moduli in cui le attività sono localizzate.

Qualcosa di simile a

CELERY_INCLUDE = [ 
    'M24', 
] 
Problemi correlati