backgroundrb problem

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!

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