Admin function to cancel unique job ids
Bug #1339730 reported by
Ricardo Branco
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
New
|
Undecided
|
Unassigned |
Bug Description
We have encountered a problem where unique-jobs are stuck in a queue after the worker-function was removed prior to completing the jobs.
When a worker is dropped from GM it should remove all the unique jobs that were assigned to it.
Also when using --show-unique-jobs can it also show what functions they are related to.
To post a comment you must log in.
After patching on version 1.1.12 with this patch file, you can use these methods to cancel jobs of some functions or some job handles or some job uniques: 4,H:Linux: 43,H:Linux: 42,H:Linux: 47 unique- jobs - TEST0,TEST1,TEST2 unique- jobs e919816c- 2838-11e4- b83c-6c71d98baf d2,e9196c22- 2838-11e4- b83c-6c71d98baf d2 4,H:Linux: 43,H:Linux: 42,H:Linux: 47 2838-11e4- b83c-6c71d98baf d2,e9196c22- 2838-11e4- b83c-6c71d98baf d2
gearadmin -S --cancel-jobs - TEST0,TEST1,TEST2
gearadmin -S --cancel-jobs H:Linux:
gearadmin -S --cancel-
gearadmin -S --cancel-
You can also use these methods to show jobs of some functions or some job handles or some job uniques:
gearadmin -S --show-jobs - TEST0,TEST1,TEST2
gearadmin -S --show-jobs H:Linux:
gearadmin -S --show-unique-jobs - TEST0,TEST1,TEST2
gearadmin -S --show-unique-jobs e919816c-
The show-job(s) and show-unique-job(s) commands will output these columns respectively:
job_handle, retries, is_ignored, is_queued, when_to_run, priority, is_running, numerator, denominator, unique, function
unique, retries, is_ignored, is_queued, when_to_run, priority, is_running, numerator, denominator, job_handle, function
The patch file also contains other patches of bug correction and functionality enhancement, such as SSL connection, Epoch job, HTTP protocol, MySQL queue.