2👍
✅
Well, you’ll need to have some sort of celery process running in order to handle tasks in the queue. The celeryd process listens on the queue, and executes tasks according to your settings. If you don’t have a celeryd process running, you’ll just be adding tasks to the queue, but never emptying it.
If you’re just interested in seeing your queues, I’d recommend installing the RabbitMQ management plugin.
0👍
http://ask.github.com/celery/getting-started/introduction.html
- Start your RabbitMQ server
- Define your celeryconfig.py
- Start your celery daemon: celeryd
RabbitMQ has a guest login, so that’s a faster way to get started. Put this in celeryconfig.py:
import sys
sys.path.append('.')
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_USER = "guest"
BROKER_PASSWORD = "guest"
BROKER_VHOST = "/"
CELERY_RESULT_BACKEND = "amqp"
CELERY_IMPORTS = ("tasks",)
For a quick test, put this in tasks.py:
from celery.task import task
@task
def add(x, y):
return x + y
if __name__ == "__main__":
result = add.delay(4, 4)
result.wait()
Start celeryd in the same directory has celeryconfig.py and tasks.py:
celeryd --loglevel=INFO
Finally, run tasks.py
- [Answered ]-Many views which inherit from templateview
- [Answered ]-Django saying that table does not exist
Source:stackexchange.com