[Backgroundrb-devel] MiddleMan.worker blocks?
masonhale at gmail.com
Wed Mar 7 14:27:08 EST 2007
# For reasons unknown, the following seems to block!
MiddleMan.new_worker(:class => :xml_report_worker, :args => args)
The above looks right to me. It should not matter at all what is in the
When you say it is blocking -- how do you know? What is the symptom? Is is
If you create a test worker that loops indefinitely (or for a sufficiently
long time, "sleep 120" should do) -- does it that block when you create a
new instance with MiddleMan.new_worker?
If it is just slow to return, I find there is some lag when spawning a new
process, which can make the MiddleMan.new_worker call sluggish to return.
But in my experience it does not block until the worker is done. It *does*
block until the process is created.
A way to speed up the new_worker calls is to set an explicit job_key to call
the do_work method on a long running process, rather than starting a new
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel