如何判断gearman客户端的后台作业或非阻塞请求是否成功?
while (True):
jobs = getJobs()
submitted_requests = gm_client.submit_multiple_jobs(jobs, background = False, wait_until_complete = False)
# check status in a non-blocking mode
答案 0 :(得分:0)
您可以参考this link
这是片段
completed_requests = gm_client.wait_until_jobs_completed(submitted_requests, poll_timeout=5.0)
for completed_job_request in completed_requests:
check_request_status(completed_job_request)
check_request_status在链接中定义。