Hi,
I’m using backgroundrb workers to do a lot of work that is being
unloaded to a different system… it works, but over a period of time
with much usage the server my rails app is on gets overloaded with
backgroundrb workers that didn’t get killed. this eventually causes
backgroundrb to stop working and my server takes a massive performance
hit with all the memory getting eaten up… i’ve heard about a trick
where instead of doing doing this:
key = MiddleMan.new_worker(:class => :myapp_worker)
worker = MiddleMan.worker(key)
worker.do_work
worker.delete
where i make a new worker in my controller each time i need it to do
something… that instead i can have a single worker created and just
use that one worker throughout my rails app…
so how do i do that?
Thanks,
Stuart