You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.
Ok, if I understood well it says to send the GEARMAN_COMMAND_GET_STATUS command that answers with a message like this:
{'known': '1', 'numerator': '0', 'running': '1', 'denominator': '0', 'job_handle': 'H:lab-vm12:2266'}
But it only says if there is a job running, and after the worker has finished it turns to:
{'known': '0', 'numerator': '0', 'running': '0', 'denominator': '0', 'job_handle': 'H:lab-vm12:2266'}
So I cannot reach the resulting data.
Is there a command such as "GEARMAN_COMMAND_GET_WORKING_DATA" that I can send to the gearman server to obtain the job result?
The easiest way to handle this with background jobs is to use job_handle as a key in an alternative storage engine and then looking the data up there if known==0, running==0 and you're sure that the job has existed (use job_handle for that).
Unfortunately GET_STATUS responses will say known==0 && running==0 for both jobs that have finished and jobs that never existed in the first place. This goes beyond the use case of Gearman, use alternative storage in your application to keep track of it and populate the key there (job_handle) with the status msgs that you want to access later.
WORK_STATUS is only for non-background jobs. With background jobs you have to substitute Gearman's WORK_STATUS. I think the Gearman daemon even drops the status of background jobs entirely once executed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
looking at http://pythonhosted.org/gearman/client.html#retrieving-job-status there does not appear to be any way to get the result of a background job. Waiting on status complete does not work because "complete" for a background job is when it receives it.
The text was updated successfully, but these errors were encountered: