Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
    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')
Пример #4
0
    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')