ask/celery — Issue #560: HttpDispatchTask throwing NotRegistered error on celery consumer V 2.4.5
Author: phoenix01
Created: 2011-12-08 05:21:56+00:00
State: open

I have been using celery for a while, recently i upgraded to version 2.4.5 from 2.1.3 and when i try to do the following on python shell
>>> from celery.task.http import HttpDispatchTask
>>> resp = HttpDispatchTask.apply_async(None, {'url': 'http://example.com', 'method':'GET'}, routing_key='rout_key')

on the consumer side I see the following error -------

[2011-12-08 03:24:21,326: ERROR/MainProcess] Received unregistered task of type 'celery.task.http.HttpDispatchTask'.
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': 'celery.task.http.HttpDispatchTask', 'args': [], 'expires': None, 'eta': None, 'kwargs': {'url': 'http://example.com', 'method': 'GET'}, 'id': 'b0d6a13f-a719-499f-a44e-a1de6e7621dc'}
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/celery/worker/consumer.py", line 427, in receive_message
eventer=self.event_dispatcher)
File "/usr/local/lib/python2.6/dist-packages/celery/worker/job.py", line 297, in from_message
on_ack=on_ack, delivery_info=delivery_info, **kw)
File "/usr/local/lib/python2.6/dist-packages/celery/worker/job.py", line 261, in __init__
self.task = registry.tasks[self.task_name]
File "/usr/local/lib/python2.6/dist-packages/celery/registry.py", line 66, in __getitem__
raise self.NotRegistered(key)
NotRegistered: 'celery.task.http.HttpDispatchTask'

I can see the the entry 'celery.task.http.HttpDispatchTask': <@task: celery.task.http.HttpDispatchTask > in celery.registry.tasks , but still the consumer claims that its an unregistered task.