[Backgroundrb-devel] Cleaing up after workers in backgroundrb
hemant kumar
gethemant at gmail.com
Thu Mar 6 09:27:19 EST 2008
On Thu, 2008-03-06 at 08:43 -0500, mike bukhin wrote:
> I just remember that in the older version of backgroundrb I was having
> memory/performance issues until I added self.delete to do_work. Then
> those problems went away. My worker is very simple:
>
> class ContextWorker < BackgrounDRb::MetaWorker
>
> set_worker_name :context_worker
> pool_size 5
>
>
> def create(args = nil)
>
> end
>
> def process_context(context_id)
> require 'context_update'
> @r_update = ContextUpdate.new(Time.now)
> @r_update.load_public_context(context_id)
> end
>
> end
>
>
> The bulk of the code is in libraries. So you're saying I self.delete
> is the same as putting exit after
> @r_update.load_public_context(context_id)?
>
As far as I remember self.delete used to delete/exit the current worker.
"exit" does the same thing in newer version.
More information about the Backgroundrb-devel
mailing list