Background job handling
Hello Gearman-Team,
I have question related to background job handling.
I have the following test case (pseudocode):
on localhost
<prepare>
# reset job server (RHEL)
service gearmand restart
result > success
(gearmand 1.1.8)
# empty queue
$worker-
while ($worker->work()) { 1; }
result > done
CTRL-C (execution break)
/usr/bin/gearadmin --show-jobs
output > .
(queue is empty)
# queue it up
$jobHandle = $gmclient-
result > $jobHandle == "H:localhost.
$jobHandle = $gmclient-
result > $jobHandle == "H:localhost.
$jobHandle = $gmclient-
result > $jobHandle == "H:localhost.
# empty queue again
$worker-
while ($worker->work()) { 1; }
result > done
CTRL-C
/usr/bin/gearadmin --show-jobs
output > .
(queue is empty)
all fine, but...
<actual test>
$jobHandle = $gmclient-
result > $jobHandle == "H:localhost.
/usr/bin/gearadmin --show-jobs
output > H:localhost.
output > .
# reset job server
service gearmand restart
result > success
/usr/bin/gearadmin --show-jobs
output > H:localhost.
output > .
Job handle is "H:localhost.
While reading documentation and examples I found no way to pull state of the background job without knowing of job handle, but from my point of view job handle is internal thing and completelly unusable in deal with background jobs from outside of the job server.
So, how to pull state of the long running background job in reliable way or it is impossible at all?
Sorry for my english.
Looking forward to your answers.
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Gearman Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- chjgcn
- Solved:
- Last query:
- Last reply: