search for: check_terminate

Displaying 2 results from an estimated 2 matches for "check_terminate".

2006 Jun 28
1
How to add some process control...
...jobs[key].thread[:safe_to_kill].wait(@mutex) @jobs[key].thread.kill end @jobs.delete(key) end @timestamps.delete(key) if @timestamps.has_key?(key) } end Inside BackgrounDrb:Rails: you can use terminate() to establish the checkpoints/killpoints inside your job code, or check_terminate/terminate? to check, run cleanup code, and then raise the :safe_to_kill signal. def initialize(job_key, args={}) @logger = BACKGROUNDRB_LOGGER @thread = nil; @job_key = job_key @args = args end def start_process begin @thread = Thread.new do Thread.current[:safe_to_kill] = Con...
2006 Jul 01
9
BackgrounDRb New release.
Howdy Folks- I''m happy to announce a new release of BackgrounDRb! I have added quite a few new features and included some nice patches from folks on the list. $ script/plugin install svn://rubyforge.org//var/svn/backgroundrb All of the code now stays within the plugin and the start and stop scripts are now just stubs. This makes it easier to tweak or figure out how it works.