I play with demos with a celery tutorial. However, when the task application started, the results were disabled. as shown below. Any idea?
celery --app=plmtcheck worker -l info Then I see: - ** ---------- .> app: plmtcheck:0x7f9fd2fdf160 - ** ---------- .> transport: amqp:// guest@localhost :5672// - ** ---------- .> results: disabled I have seen the result is ready. [2014-05-05 16:16:55,382: INFO/MainProcess] Connected to amqp:// guest@127.0.0.1 :5672// [2014-05-05 16:16:55,389: INFO/MainProcess] mingle: searching for neighbors [2014-05-05 16:16:56,401: INFO/MainProcess] mingle: all alone [2014-05-05 16:16:56,422: WARNING/MainProcess] celery@D-NYC-00552088-Linux ready. [2014-05-05 16:17:27,726: INFO/MainProcess] Received task: plmtcheck.add[7ea5a501-1085-48b7-8f7e-dac8ac2c5377] [2014-05-05 16:17:27,759: INFO/MainProcess] Task plmtcheck.add[7ea5a501-1085-48b7-8f7e-dac8ac2c5377] succeeded in 0.032166894000056345s: 37
My code is just
from celery import Celery app = Celery('plmtcheck', backend='amqp', broker='amqp://') @app.task def add(x, y): return x + y if __name__ == '__main__': app.worker_main()
Hu cao
source share