Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel a job #50

Open
herlon214 opened this issue Aug 26, 2016 · 3 comments
Open

Cancel a job #50

herlon214 opened this issue Aug 26, 2016 · 3 comments
Labels

Comments

@herlon214
Copy link

There is any way to cancel a job after sometime?

let job = client.submitJob('test', 'a')
// I need to cancel this job after 60 seconds, how I do this?
@mike442144
Copy link
Contributor

mike442144 commented Sep 18, 2016

Updated:
I noticed that someone can cancel a job use gearadmin.

No, there is no way to cancel in Gearman protocol.
Actually, there is a function related to this behavior in Gearman server's code,which is in C language:

gearmand_error_t gearman_server_job_cancel(gearman_server_st& server,
                                           const char *job_handle,
                                           const size_t job_handle_length)

But, there is no cancel protocol in Gearman Protocol Specification.

@veny veny added the question label Feb 8, 2017
@veny
Copy link
Owner

veny commented Feb 8, 2017

what about CAN_DO_TIMEOUT

  1. see http://gearman.org/protocol/
  2. see 'timeout' parameter here: https://github.com/veny/GearmaNode#register-function

@mike442144
Copy link
Contributor

mike442144 commented Feb 13, 2017

@veny maybe the gearman_server_job_cancel is an inner function? if not we should implement the protocol.

CAN_DO_TIMEOUT is not exactly the same with cancel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants