Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed Celery for my Django project following what the official tutorial / doc says. And it's working fine when I launch celery at the command line, I can see it receiving the tasks and execute them. But once everything was working I decided to follow the docs a bit more to daemonize celery and leave it running all the time. So I tried the provided celeryd init scripts on an Ubuntu system with the /etc/default/celeryd script too. I changed the values accordingly and it starts correctly but when it receives a task the log says:

ERROR/MainProcess] Received unregistered task of type 'likes.tasks.test'.
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.

And then I get the details of what the task was asking. Again, this task works perfectly when I launch celery on the command line without any configuration. What could have gone wrong at that point? I use a virtual environment just in case it would change anything, but I specified it in the config file too.

share|improve this question

1 Answer 1

Late answer, but maybe it helps someone.

Have you seen http://docs.celeryproject.org/en/latest/userguide/tasks.html#automatic-naming-and-relative-imports ?

You should start the worker with --loglevel=info, that way it will log a list of registered tasks when it starts up. You must make sure the names the tasks are registered with matches the name you are sending in messages.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.