[Backgroundrb-devel] Reusable workers

David Lee davidjy.lee at gmail.com
Tue Nov 21 14:40:52 EST 2006


I'm using the scheduler to create several reusable workers of the same type,
.e.g., RSSWorker, so I can avoid the overhead of initializing new processes
(as suggested by Ezra to my previous question). Creating new workers through
the external yaml seems pretty straightforward, but my question is is there
a way to call these workers without using the job key? Currently, to use
these workers, I have to refer to them by their job key. If a particular
worker is available, it will go to work; otherwise, the request gets queued
up. But in my case, I'd like to be able to delegate work to ANY worker
that's available, so the requests get serviced much more quickly.

Just as an idea, I thought that it might be cool if Middleman.new_worker(:class
=> :rss_worker) would pick up an available worker from the pool and make it
go to work :)

To my knowledge, this kind of feature isn't available yet, but if anyone
knows of a way this could be done, I'd appreciate any help.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061121/a7bb009e/attachment.html 

More information about the Backgroundrb-devel mailing list