Here are the examples of the python api twisted.application.service.IServiceCollection taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Source : test_service.py
with MIT License
from autofelix
with MIT License
from autofelix
def test_applicationComponents(self):
"""
Check L{twisted.application.service.Application} instantiation.
"""
app = Application('app-name')
self.assertTrue(verifyObject(IService, IService(app)))
self.assertTrue(
verifyObject(IServiceCollection, IServiceCollection(app)))
self.assertTrue(verifyObject(IProcess, IProcess(app)))
self.assertTrue(verifyObject(IPersistable, IPersistable(app)))
3
Source : service.py
with GNU General Public License v2.0
from flathub
with GNU General Public License v2.0
from flathub
def setServiceParent(self, parent):
if self.parent is not None:
yield self.disownServiceParent()
parent = service.IServiceCollection(parent, parent)
self.parent = parent
yield self.parent.addService(self)
# service.Service.disownServiceParent does not wait for removeService to complete before
# setting parent to None
@defer.inlineCallbacks