A few questions about jobs and results
Joe Stump
joe at digg.com
Mon Oct 15 23:51:50 UTC 2007
So I've got a worker firing jobs and the job sending stuff back
(yay!), but I'm confused about all of the various ways to submit a
job and how to fetch the results of those jobs. Also, there's some
weirdness on fetching the results that I'm seeing.
1.) submit_job appears to work synchronously in that if the client
disappears then Gearman kills the job essentially. Is this correct?
Also, what's the difference between work_status and status_res? It
appears Gearman sends one or the other somewhat randomly.
2.) submit_job_bg appears to be a "fire and forget" mechanism in that
Gearman fires the job and then will give you a status, but when it's
complete you can't poll Gearman for the result. Does this mean the
job needs to put the result in a dumping ground that the client would
then query once it noticed the job was done?
3.) There seems to be no definitive mechanism to tell whether a
background job is done (or any job for that matter). Is this correct?
It seems get_status returns status_res with known/running set to 0
whether it's a job that's been ran or a job that doesn't exist. Does
Gearman not store the result of work_complete or work_fail?
Thoughts?
Thanks!
--Joe
More information about the Gearman
mailing list