Discussion:
Received unregistered task for celery
sandeep G Kurdagi
2014-08-19 14:27:25 UTC
Permalink
I am getting unregistered error when i run the worker to take jobs from a
queue. This is how i am doing

celery -A Tasks beat

The above command will schedule a job at specific time. After that, the
task will be added to default queue.Now i run celery worker in other
terminal as below

celery worker -Q default

But i am getting the following error

[2014-08-19 19:34:02,466: ERROR/MainProcess] Received unregistered task of type 'TasksReg.vodafone_v2'.
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:
{'utc': False, 'chord': None, 'args': [[u'Kerala,Karnataka']], 'retries': 0, 'expires': None, 'task': 'TasksReg.vodafone_v2', 'callbacks': None, 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, 'id': 'd4390336-9110-4e47-9e3a-017017cb509c'} (244b)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: 'TasksReg.vodafone_v2'
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
Ask Solem
2014-08-20 11:44:11 UTC
Permalink
Did you read
http://docs.celeryproject.org/en/latest/userguide/tasks.html#names
?

Especially the section about relative imports.


Sent from my iPhone
I am getting unregistered error when i run the worker to take jobs from a queue. This is how i am doing
celery -A Tasks beat
The above command will schedule a job at specific time. After that, the task will be added to default queue.Now i run celery worker in other terminal as below
celery worker -Q default
But i am getting the following error
[2014-08-19 19:34:02,466: ERROR/MainProcess] Received unregistered task of type 'TasksReg.vodafone_v2'.
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.
{'utc': False, 'chord': None, 'args': [[u'Kerala,Karnataka']], 'retries': 0, 'expires': None, 'task': 'TasksReg.vodafone_v2', 'callbacks': None, 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, 'id': 'd4390336-9110-4e47-9e3a-017017cb509c'} (244b)
File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: 'TasksReg.vodafone_v2'
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
sandeep G Kurdagi
2014-08-21 07:07:58 UTC
Permalink
Ya Ask. i read it.
But please let me know whether a worker can be started to follow a queue
without using -A option.
when i run the worker as below, it gives me unregistered task error

celery worker -Q default
And when i run with -A option, the task gets executed.

celery -A task worker -Q default
Post by Ask Solem
Did you read
http://docs.celeryproject.org/en/latest/userguide/tasks.html#names
?
Especially the section about relative imports.
Sent from my iPhone
I am getting unregistered error when i run the worker to take jobs from a
queue. This is how i am doing
celery -A Tasks beat
The above command will schedule a job at specific time. After that, the
task will be added to default queue.Now i run celery worker in other
terminal as below
celery worker -Q default
But i am getting the following error
[2014-08-19 19:34:02,466: ERROR/MainProcess] Received unregistered task of type 'TasksReg.vodafone_v2'.
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.
{'utc': False, 'chord': None, 'args': [[u'Kerala,Karnataka']], 'retries': 0, 'expires': None, 'task': 'TasksReg.vodafone_v2', 'callbacks': None, 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, 'id': 'd4390336-9110-4e47-9e3a-017017cb509c'} (244b)
File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: 'TasksReg.vodafone_v2'
--
You received this message because you are subscribed to the Google Groups
"celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
Ask Solem
2014-08-21 14:26:39 UTC
Permalink
You can, but the worker won't have any task registered.

Sent from my iPhone
Post by sandeep G Kurdagi
Ya Ask. i read it.
But please let me know whether a worker can be started to follow a queue without using -A option.
when i run the worker as below, it gives me unregistered task error
celery worker -Q default
And when i run with -A option, the task gets executed.
celery -A task worker -Q default
Post by Ask Solem
Did you read
http://docs.celeryproject.org/en/latest/userguide/tasks.html#names
?
Especially the section about relative imports.
Sent from my iPhone
I am getting unregistered error when i run the worker to take jobs from a queue. This is how i am doing
celery -A Tasks beat
The above command will schedule a job at specific time. After that, the task will be added to default queue.Now i run celery worker in other terminal as below
celery worker -Q default
But i am getting the following error
[2014-08-19 19:34:02,466: ERROR/MainProcess] Received unregistered task of type 'TasksReg.vodafone_v2'.
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.
{'utc': False, 'chord': None, 'args': [[u'Kerala,Karnataka']], 'retries': 0, 'expires': None, 'task': 'TasksReg.vodafone_v2', 'callbacks': None, 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, 'id': 'd4390336-9110-4e47-9e3a-017017cb509c'} (244b)
File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: 'TasksReg.vodafone_v2'
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
Loading...