search for: p_data

Displaying 5 results from an estimated 5 matches for "p_data".

Did you mean: b_data
2007 Oct 31
4
How you want BackgrounDrb to behave
...will keep the name BackgroundRb. Ok, in new API, a worker looks like this: require "net/smtp" require "guid" class NewsletterWorker < Packet::Worker set_worker_name :newsletter_worker def worker_init puts "starting the worker" end def receive_data p_data end # this is where a request from rails will be received. so implement this method # if you want to trigger your workers from rails. def receive_internal_data p_data self.send(p_data[:method],p_data[:data]) end def send_mail data end end And you can invoke a method in worker f...
2007 Nov 02
10
pre-release version of backgroundrb available now from svn
...re passing large objects around. I will try to explain meat of a sample worker: class FooWorker < MetaWorker set_worker_name :foo_worker attr_accessor :count def worker_init puts "Starting Foo Worker" add_periodic_timer(4) { increment_status} 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...
2007 Dec 06
10
Feedback on RC2
I tried to upgrade my existing application to RC2 last night. Like many, I use this mostly for running scheduled tasks. For the moment, I''ve abandoned the effort, but am looking forward to being able to use this. Feedback below: First, the reason I was looking forward to this upgrade was to use the threaded scheduler. I have an application with long-running tasks. I found that
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
...T 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_data) user_input = p_data[:data] result = self.send(user_input[:method],user_input[:data]) send_response(p_data,result) end end ''create'' method gets called, when worker is loaded and created. Each worker runs in its own process and you can use ''cre...
2008 Jan 18
8
Query All Worker
What does the method query_all_workers() do? There is no documentation on what this method returns (1.0.1 version). Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080118/9f9b8112/attachment.html