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

Added ability to receive the job as one of the arguments to the job handler. #4

Closed
wants to merge 8 commits into from
Closed

Added ability to receive the job as one of the arguments to the job handler. #4

wants to merge 8 commits into from

Conversation

ryanmcgarvey
Copy link

We needed this because we're using a specific queue to handle stopping and starting stalkers with God. In order to do this, we need the ability to delete the job itself, since we're exiting mid block.

We're not sure this is the cleanest way to achieve this goal, but it's certainly the most straight forward and future proof. We discussed building in a "death queue" to stalker itself, but that quickly begins to violate the responsibilities of the stalker library.

@jondruse
Copy link

+1 for this since it would also allow you to "touch" a job instead of setting a super long ttr.

@ryanmcgarvey
Copy link
Author

I'm not sure what you mean by touch - reset?

@jondruse
Copy link

https://github.com/dustin/beanstalk-client-ruby/blob/master/lib/beanstalk-client/job.rb#L68

Yeah I think that's the same thing. If you have a long running job, you can keep it alive with touch. Unless I'm understanding it incorrectly.

@jondruse
Copy link

jondruse commented May 3, 2012

Any love for this?

@rewritten
Copy link

In stalker, you can't touch a job unless you remove the Timeout.timeout block at https://github.com/han/stalker/blob/master/lib/stalker.rb#L77

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