0

how can I tell if a background job or a non-blocking request by gearman client is successful or not?

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
shilk
  • 589
  • 5
  • 17

1 Answers1

0

You can refer to this link

here is the snippet

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 is defined in the link.

Gunjan
  • 2,775
  • 27
  • 30