Exception Stalker::JobTimeout

28 views
Skip to first unread message

Deepak Prasanna

unread,
Apr 12, 2012, 7:16:09 AM4/12/12
to beanstalk-talk
Hi guys,

First of all, a big thanks for beanstalk team.
I am using stalker for managing my background jobs.
I have some process which would run for more than 119s.
Those jobs which takes more than 119s are raising "Exception
Stalker::JobTimeout".
I know I can manually specify the ttr like below.

Stalker.enqueue("video.webm", {:id => @video.id}, {:ttr => 10})

But the problem is, I really don't have any idea how much the time
process would consume. It may take minutes to hours.
The ideal approach is use "touch". I don't find any resources online
on how do the stalker way of touching beanstalkd saying im still
alive.

job "run.query" do |args|
@query_event = QueryEvent.find(args["id"])
@query_event.execute_query!
end

My job looks something like the above. Help is appreciated.

Thanks,
Deepak.

Dennis

unread,
Apr 24, 2012, 12:28:36 PM4/24/12
to beanstalk-talk
Stalker's framework doesn't currently allow access to the job to touch
it.
I believe there are some forks of the project on GitHub that pass the
job into the args variable.
Otherwise, you'd need to use something like the beanstalk-client
library directly to touch a job in progress.

-Dennis
Reply all
Reply to author
Forward
0 new messages