当前位置: 首页>>代码示例>>Python>>正文


Python Service.connectThroughLocator方法代码示例

本文整理汇总了Python中cocaine.services.Service.connectThroughLocator方法的典型用法代码示例。如果您正苦于以下问题:Python Service.connectThroughLocator方法的具体用法?Python Service.connectThroughLocator怎么用?Python Service.connectThroughLocator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cocaine.services.Service的用法示例。


在下文中一共展示了Service.connectThroughLocator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: execute

# 需要导入模块: from cocaine.services import Service [as 别名]
# 或者: from cocaine.services.Service import connectThroughLocator [as 别名]
 def execute(self):
     appNames = yield self.node.list()
     appInfoList = {}
     for appName in appNames:
         info = ''
         try:
             app = Service(appName, blockingConnect=False)
             yield app.connectThroughLocator(self.locator)
             info = yield app.info()
         except Exception as err:
             info = str(err)
         finally:
             appInfoList[appName] = info
     result = {
         'apps': appInfoList
     }
     yield result
开发者ID:ApelSYN,项目名称:cocaine-tools,代码行数:19,代码来源:common.py

示例2: info

# 需要导入模块: from cocaine.services import Service [as 别名]
# 或者: from cocaine.services.Service import connectThroughLocator [as 别名]
 def info(self, apps):
     infos = {}
     for app_ in apps:
         info = ''
         try:
             app = Service(app_, blockingConnect=False)
             yield app.connectThroughLocator(self.locator)
             info = yield app.info()
             if all([self._expand, self._storage is not None, 'profile' in info]):
                 info['profile'] = yield profile.View(self._storage, info['profile']).execute()
         except Exception as err:
             info = str(err)
         finally:
             infos[app_] = info
     result = {
         'apps': infos
     }
     yield result
开发者ID:padm,项目名称:cocaine-tools,代码行数:20,代码来源:common.py


注:本文中的cocaine.services.Service.connectThroughLocator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。