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

Graceful shutdown #43

Open
noonien opened this issue Apr 5, 2017 · 1 comment
Open

Graceful shutdown #43

noonien opened this issue Apr 5, 2017 · 1 comment

Comments

@noonien
Copy link

noonien commented Apr 5, 2017

When stopping the worker, I'd like to be able to tell the jobs that they should stop. And re-queue them on other workers.

In my use-case I've implemented the method to signal that the job needs to stop, however, there's no way to stop the job without either marking it as completed or as failed.

If I re-queue the job manually, I lose the MaxFails options, if I fail the job by returning an error, work still cannot honor the MaxFails value.

How would one go about doing this? I suggest if a job returns a work.ErrSkip error , MaxFails should not be increased.

@srininara
Copy link

How did you implement the method to handle job specific handling. Was it using middleware or something else?

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

No branches or pull requests

2 participants