python - AsyncResult get() does not return -
i trying use celery chords , trying run following example -
@celery.task(ignore_result = false) def add(x, y): return x + y @celery.task(ignore_result = false) def tsum(numbers): return sum(numbers) celery import chord callback = tsum.s() header = [add.s(i, i) in range(5)] result = chord(header)(callback) print result.get()
i can see tasks run in celery logs. however, line result.get()
not return. have set celery_result_backend = 'amqp://'
i new celery chords , trying sample program run first. missing here.
following celery config-
celery_broker_url = 'amqp://' celery_result_backend = 'amqp://' celery_task_serializer = 'json' celery_accept_content = ['json'] celery_result_serializer = 'json' celery_enable_utc = true
edit: adding determining detail!
the problem fixed, totally unrelated celery itself. detail the system runs on microsoft azure. i'm adding , accepting answer. i'm rewarding each kind contribution point.
your chord
not getting struck because not receiving results header , cannot start callback function.
thid due celery config
celery_result_backend = 'amqp://'
but should
celery_result_backend = 'amqp'
change , should work fine.
Comments
Post a Comment