[Backgroundrb-devel] backgrounDRb problems with results and MiddleMan

D. Taylor Singletary taylorsingletary at gmail.com
Thu Dec 7 11:14:11 EST 2006

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)

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
    /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

D. Taylor Singletary
Reality Technician
"Look at my hair; like the design." -- David Byrne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061207/8f329a1e/attachment.html 

More information about the Backgroundrb-devel mailing list