[Backgroundrb-devel] Worker suicide

John O'Shea joshea at nooked.com
Thu Jan 10 14:42:00 EST 2008


By co-incidence I have the same use case - the (dynamically created)  
worker process is exiting just fine when it hits the exit at the end  
of the create method.  However, subsequent calls to  
MiddleMan.query_all_workers still lists the worker and its last known  
status.  I have a web UI for monitoring worker activity so this is a  
little misleading for our admins.

Is there any way to get the master to realize the worker is gone?  I  
am also seeing "Some read error" messages in the backroundrb console  
and judging from a related discussion at http://rubyforge.org/pipermail/backgroundrb-devel/2007-December/001146.html 
  the master isn't cleaning up the socket connection to the worker  
(and removing the worker from its internal lists).

(I'm running from the 1.0 release tag btw).

John.

On 10 Jan 2008, at 17:17, Zachary Powell wrote:

> exit is definitely the command (its the ruby kernel method for  
> ending the process). though i've never running into it not working.  
> are you sure its getting as far as the exit command (not hanging up  
> on a loop etc)? try logger.info('before exit') and 'after exit' to  
> see if that shows up in the backgroundrb.log.
>
> i'm assuming you've read the docs and understand the  
> "set_no_auto_load true") method etc, so ruling out the possibility  
> of it just been a different copy of the worker..
>
> On 1/10/08, Danny Burkes <dburkes at infoteria.com> wrote:
> > put "exit" on the last line
> >
> > def create
> >   #... do stuff
> >   exit
> > end
> >
> > (can be called anywhere in the worker, in other methods etc).
> >
>
> That doesn't seem to work- I still see the ruby process in ps.  This
> is a dynamically-created worker, and I want to exit the entire process
> once it is finished.  Any other ideas?
>
> Thanks,
>
> Danny
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
>
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080110/784595ea/attachment.html 


More information about the Backgroundrb-devel mailing list