search for: worker_root

Displaying 3 results from an estimated 3 matches for "worker_root".

Did you mean: worker_loop
2008 Jan 29
4
Setting up release-1.0.1
...s.rb:453:in `const_missing'' from ./script/backgroundrb:41 Then after doing this: Index: script/backgroundrb =================================================================== --- script/backgroundrb (revision 313) +++ script/backgroundrb (working copy) @@ -6,8 +6,10 @@ WORKER_ROOT = rails_root + "/lib/workers" SERVER_LOGGER = rails_root + "/log/backgroundrb_server.log" -["server","framework","lib"].each { |x| $LOAD_PATH.unshift(PACKET_APP + "/#{x}")} -$LOAD_PATH.unshift(WORKER_ROOT) +#["server","...
2007 Nov 02
10
pre-release version of backgroundrb available now from svn
...us} end def process_request p_data p p_data end def increment_status @count ||= 0 @count += 1 register_status(@count) end end First, I intend to wrap MetaWorker within a namespace(read module), so pardon me there. So, when backgroundrb starts it reads all the workers in WORKER_ROOT(which should be RAILS_ROOT/lib/workers) directory and worker_init is called in child process of each worker. You can use worker_init for initializing a worker. "process_request" is the method which will be normally invoked when you receive requests from rails. But there is a exception, i...
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
...end Above snippet would register the proc for periodic execution at every 5 seconds. === Code Install the plugin, and run setup task. Create a worker, using worker generator. ./script/generatr worker bar You will have a bar_worker.rb in your RAILS_ROOT/lib/workers/( called WORKER_ROOT henceforth ). Generated code will look like this: class BarWorker < BackgrounDRb::MetaWorker set_worker_name :bar_worker def create # this method is called, when worker is loaded for the first time puts "starting a bar worker" end def process_request(p...