search for: worker_init

Displaying 6 results from an estimated 6 matches for "worker_init".

2007 Nov 02
10
pre-release version of backgroundrb available now from svn
...in most situations, passing ''id'' of object is enough i thought. Also, you may encounter some bugs when you are 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 mod...
2007 Oct 31
4
How you want BackgrounDrb to behave
...reply back. The code has changed significantly and its no longer using DRB. But I 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]) en...
2009 Jan 06
1
ask_status/register_status deprecated???
...gister_status method is encountered: ...lib/workers/session_worker.rb:10:in `create'': undefined method `register_status'' for #<SessionWorker:0xb6e7d52c> (NoMethodError) from /home/rut216/dev/illinicourses/vendor/plugins/backgroundrb/server/lib/meta_worker.rb:129:in `worker_init'' from /var/lib/gems/1.8/gems/packet-0.1.14/bin/../lib/packet/packet_worker.rb:19:in `start_worker'' from /var/lib/gems/1.8/gems/packet-0.1.14/bin/packet_worker_runner:33:in `load_worker'' from /var/lib/gems/1.8/gems/packet-0.1.14/bin/packet_worker_ru...
2008 Jan 31
2
cron scheduling problem
...ule'' from brb-test/vendor/plugins/backgroundrb/server/meta_worker.rb:258:in `each'' from brb-test/vendor/plugins/backgroundrb/server/meta_worker.rb:258:in `new_load_schedule'' from brb-test/vendor/plugins/backgroundrb/server/meta_worker.rb:183:in `worker_init'' from brb-test/vendor/plugins/backgroundrb/framework/worker.rb:20:in `start_worker'' from brb-test/vendor/plugins/backgroundrb/framework/packet_master.rb:134:in `fork_and_load'' from brb-test/vendor/plugins/backgroundrb/framework/packet_master.rb:...
2007 Dec 25
6
error: no marshal_dump is defined for class Thread
I get this error periodically in backgroundrb.log, but only on my production box (the one running ruby 1.8.5) - my dev box doesn''t get this error. As far as I can tell, everything is working ok, despite the error (I don''t really know how to determine if the jobs are getting threaded successfully, but they are running, that I am sure of). Here''s the dump: no
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