[Backgroundrb-devel] backgrounDRb problems with results and MiddleMan

Ezra Zygmuntowicz ezmobius at gmail.com
Thu Dec 7 13:49:15 EST 2006

Hey There-

	I think you may be using the old version of the plugin. Make sure  
you install it from here:


	Try that instead. You will need to remove all traces of the old  
plugin before you install this one.


On Dec 7, 2006, at 8:14 AM, D. Taylor Singletary wrote:

> Hi there,
> I've been experimenting with implementing BackgroundDRb in my rails  
> app but am running into some problems.
> The primary problem I'm getting is in cleaning up worker threads,  
> or getting any kind of response out of worker threads.
> If try using the response function/hash in my Worker the worker  
> will not execute reporting that response is an unknown variable or  
> function. (My worker descends from BackgrounDRb::Rails )
> undefined local variable or method `results' for  
> #<ScheduleGeneratorWorker:0x1461f94> - (NameError)
> ./script/backgroundrb/../../config/../lib/workers/ 
> schedule_generator_worker.rb:9:in `do_work'
> This makes it hard to decide when to delete the workers, if I can't  
> get any status out of them.
> My second issue is that I'm trying to create an after_filter to a  
> controller that looks for any "keys" saved to the session and then  
> load the worker class to query status (assuming that "response"  
> actually worked..). When I try to re-substantiate the worker using  
> MiddleMan.worker(worker_key) I get an error reporting that worker  
> is not a method of MiddleMan.
> NoMethodError (undefined method `worker' for  
> #<BackgrounDRb::MiddleMan:0x146377c>):
>     /app/controllers/workbench_controller.rb:31:in  
> `get_rid_of_workers'
> All the rdoc documentation I've read for BackgroundDRb say that  
> this is the way to control the response and load a worker.
> What am I doing wrong? Has anyone else had issues like this? I can  
> get the thread to start if I take out all of my references to  
> results and my filter, but then I have no way of monitoring it or  
> stopping it.
> Thanks for any help. A previous version of this message was posted  
> to the Rails mailing list.
> D. Taylor Singletary
> http://www.realitytechnicians.com
> -- 
> D. Taylor Singletary
> Reality Technician
> "Look at my hair; like the design." -- David Byrne
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

More information about the Backgroundrb-devel mailing list