[Twisted-Python] Getting multiservice from running reactor

Can someone advise if it possible to obtain a service or multiservice object from the reactor object. I am interested in status of services in multiservice. Many thanks. Regards, David

On Mon, 07 May 2007 13:26:36 -0300, David Pratt <fairwinds@eastlink.ca> wrote:
Can someone advise if it possible to obtain a service or multiservice object from the reactor object. I am interested in status of services in multiservice. Many thanks.
There isn't necessarily a MultiService associated with the reactor, or there may be several. Most likely, whichever code you have which is interested in the state of a service should already have a reference to it, so it can just check directly. Jean-Paul

Hi Jean Paul. Yes, normally this is the case for sure. In this case, however, this is zope 3's startup and I cannot get a handle on the multiservice after zope bootstraps. I am interested in adding services to running reactor with some control on starting and stopping them. Is it not possible to determine what services the reactor is operating on another way. Many thanks. Regards, David ----- Original Message ----- From: Jean-Paul Calderone <exarkun@divmod.com> Date: Monday, May 7, 2007 1:51 pm Subject: Re: [Twisted-Python] Getting multiservice from running reactor
On Mon, 07 May 2007 13:26:36 -0300, David Pratt <fairwinds@eastlink.ca> wrote:
Can someone advise if it possible to obtain a service or multiservice object from the reactor object. I am interested in status of services in multiservice. Many thanks.
There isn't necessarily a MultiService associated with the reactor, or there may be several. Most likely, whichever code you have which is interested in the state of a service should already have a reference to it, so it can just check directly.
Jean-Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On Mon, 07 May 2007 16:08:25 -0300, fairwinds@eastlink.ca wrote:
Hi Jean Paul. Yes, normally this is the case for sure. In this case, however, this is zope 3's startup and I cannot get a handle on the multiservice after zope bootstraps. I am interested in adding services to running reactor with some control on starting and stopping them. Is it not possible to determine what services the reactor is operating on another way. Many thanks.
You should probably make a feature request of the Zope 3 developers. They should offer a way to get the IApplication (or IService or whatever) that their setup code creates. If they aren't willing to do this (I don't see why they wouldn't be), then maybe you can think of ways to discover it, but any such way is going to be pretty hackish and an official Zope 3 API would be preferable. Jean-Paul

Thanks Jean-Paul. I agree. I brought this up on Zope3-dev list about a week ago but it is sort of quiet on the list so no +1 or -1. I recommended a utility that could be accessed following bootstrapping to obtain the multiservice object or any other app There are already methods available in twisted for handling it afterwards. I'll likely try this again. Many thanks. Regards, David Jean-Paul Calderone wrote:
On Mon, 07 May 2007 16:08:25 -0300, fairwinds@eastlink.ca wrote:
Hi Jean Paul. Yes, normally this is the case for sure. In this case, however, this is zope 3's startup and I cannot get a handle on the multiservice after zope bootstraps. I am interested in adding services to running reactor with some control on starting and stopping them. Is it not possible to determine what services the reactor is operating on another way. Many thanks.
You should probably make a feature request of the Zope 3 developers. They should offer a way to get the IApplication (or IService or whatever) that their setup code creates. If they aren't willing to do this (I don't see why they wouldn't be), then maybe you can think of ways to discover it, but any such way is going to be pretty hackish and an official Zope 3 API would be preferable.
Jean-Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (3)
-
David Pratt
-
fairwinds@eastlink.ca
-
Jean-Paul Calderone