I just installed Celery and try to follow the guide:
I have a file called tasks.py with the following code:
from celery import Celery app = Celery('tasks', backend='amqp', broker='amqp://') @app.task def add(x, y): return x + y
I installed RabitMQ (I did not configure it, since the tutorial did not mention anything like that).
I start the server of the working celery server as follows:
celery -A tasks worker --loglevel=info
It seems to start normally (here is the output: http://i.imgur.com/qnoNCzJ.png )
Then I ran a script with the following:
from tasks import add from time import sleep result = add.delay(2,2) while not result.ready(): sleep(10)
When I check result.ready() , I always get False (so the while loop above works forever). However, on celery magazines everything looks fine:
[2014-10-30 00:58:46,673: INFO/MainProcess] Received task: tasks.add[2bc4ceba-1319-49ce-962d-1ed0a424a2ce] [2014-10-30 00:58:46,674: INFO/MainProcess] Task tasks.add[2bc4ceba-1319-49ce-962d-1ed0a424a2ce] succeeded in 0.000999927520752s: 4
So, the task was restored and succeeded. However, result.ready() is still false. Is it possible to understand why this could be? I am on Windows 7 and I am using RabbitMQ. Thanks in advance.