def getService(self, name): try: service = Service(name, blockingConnect=False) service.connectThroughLocator(self.locator, self.timeout, blocking=True) return service except Exception as err: raise ToolsError(err)
def getService(self, name): try: service = Service(name, blockingConnect=False) service.connectThroughLocator(self.locator, self.timeout, blocking=True) return service except Exception as err: raise ToolsError(err)
def execute(self): log.info('Checking "%s"... ', self.name) apps = yield List(self.storage).execute() if self.name not in apps: raise ToolsError('not available') app = Service(self.name, blockingConnect=False) try: yield app.connectThroughLocator(self.locator) info = yield app.info() log.info(info['state']) except (LocatorResolveError, ServiceError): raise ToolsError('stopped')
def execute(self): log.info('Checking "%s"... ', self.name) apps = yield List(self.storage).execute() if self.name not in apps: raise ToolsError('not available') app = Service(self.name, blockingConnect=False) try: yield app.connectThroughLocator(self.locator) info = yield app.info() log.info(info['state']) except (LocatorResolveError, ServiceError): raise ToolsError('stopped')