I have this worker: class ImportWorker < BackgrounDRb::MetaWorker set_worker_name :import_worker def create(args = nil) end def process(value) logger.info("Hello from process, value is " + value) end end When I try to start it and use a job_key I get an error in the backgroundrb log file. MiddleMan.worker(:import_worker, ''1'').process(''foobar'') 000000092 { : type: do_work: job_key" 1: worker_method: process: worker: import_worker: data" foobar datafoobarjob_key1typedo_workworker_methodprocessworkerimport_worker You have a nil object when you didn''t expect it! The error occurred while evaluating nil.send_request /Library/Ruby/Gems/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:44:in `ask_worker'' /Users/andersw/Railsapps/tre-gui-prototype_import/vendor/plugins/backgroundrb/server/lib/master_worker.rb:104:in `process_work'' If I don''t use job_key it seems to work. Has anybody else seen this? I''m using backgroundrb from svn trunk and rails 1.2.6 on Mac OSX. Thanks in advance! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
william.harding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-19 05:40 UTC
Re: backgroundrb problem
Abigail, I often get this error when I do stuff like shut down and restart my Backgroundrb server while Rails is running. I have not conclusively determined whether it matters if you start backgroundrb or the Rails server first (don''t think it does), but if I stop both my Rails server and backgroundrb, then restart them both, this error goes away. I think it might also happen after you get an exception in backgroundrb (especially in development mode), though that is speculation, I haven''t gotten it in enough reproducible states to say for sure. What I can say is that if I stop and restart both my bdrb and my rails server, the error goes away. Bill http://www.williambharding.com/blog On May 7, 12:03 pm, Abigail Headroom <rails-mailing-l...@andreas- s.net> wrote:> I have this worker: > > class ImportWorker < BackgrounDRb::MetaWorker > set_worker_name :import_worker > def create(args = nil) > end > def process(value) > logger.info("Hello from process, value is " + value) > end > end > > When I try to start it and use a job_key I get an error in the > backgroundrb log file. > > MiddleMan.worker(:import_worker, ''1'').process(''foobar'') > > 000000092 { > : type: do_work: job_key" 1: worker_method: > process: worker: import_worker: data" foobar > datafoobarjob_key1typedo_workworker_methodprocessworkerimport_worker > You have a nil object when you didn''t expect it! > The error occurred while evaluating nil.send_request > /Library/Ruby/Gems/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:44:in > `ask_worker'' > /Users/andersw/Railsapps/tre-gui-prototype_import/vendor/plugins/backgroundrb/server/lib/master_worker.rb:104:in > `process_work'' > > If I don''t use job_key it seems to work. > > Has anybody else seen this? I''m using backgroundrb from svn trunk and > rails 1.2.6 on Mac OSX. > > Thanks in advance! > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---