I want to use result = gearman_client.submit_job("reverse_task", "Hello World!", wait_until_complete=False) to submit a non-blocking job to Gearman Job Server. However, result.state is always 'CREATED', and result.complete is always False. If I change wait_until_complete to True, then everything goes right. That's so wired. Can anyone help?
How to submit non-blocking job in Gearman?
259 views Asked by expoter At
1
As python-gearman described here, you should use
gearman_client.wait_until_jobs_completed([result])to wait until all jobs completed, rather than checkingresult.completein a while loop.