I also get the same problem even if I add the amqp backend.
Here is my celery configuration file:
BROKER_HOST = "localhost" BROKER_PORT = 5672 BROKER_USER = "guest" BROKER_PASSWORD = "guest" BROKER_VHOST = "/" CELERY_RESULT_BACKEND = "amqp" CELERY_AMQP_TASK_RESULT_EXPIRES = 18000 # 5 hours. CELERY_IMPORTS = ("test", )
My shell, where the first time gets success, the second time it hangs. Someday, if I call the method again, it will work. This pattern continues to repeat.
>>> r = test.add.delay(4, 4) >>> r.get() 8 >>> r = test.add.delay(4, 4) >>> r.get() ^C <---------- it was hung here forever, I had to press ^C >>> r = test.add.delay(4, 4) >>> r.get() 8
harry
source share