[Backgroundrb-devel] Reusable workers
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel