[Backgroundrb-devel] ask_status returning 'running' even when the process has been killed

Todd Tyree todd at snappl.co.uk
Fri Feb 22 09:53:25 EST 2008


Just wondering if anyone else was seeing behaviour like this?

I've got a long running worker used to allow a cluster of mongrels to talk
to an xmpp server over a single connection using xmpp4r.  I've seen the
worker die a couple of times, so I set up a worker_alive? method that looks
like this:

def worker_alive?
  MiddleMan.ask_status(:worker => :xmpp_worker) == 'Running.'
end

The problem I'm having is that ask_status always returns 'Running', even if
the worker is dead and gone, so I can never get it to restart this way.
I've confirmed the worker is dead via top, ps and the xmpp admin console.

I've had a brief look at the ask_status code, but don't see anything
obvious.

MiddleMan#query_all_workers returns the correct information, however.

I'm running r315 of BDrb on OSX with 2.0.2.

Any thoughts or suggestions would be appreciated.

Cheers,
Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080222/0790c0ce/attachment.html 


More information about the Backgroundrb-devel mailing list