示例#1
0
    def start_services():
        rpc_service = ClusterClientService(reactor)
        rpc_service.setName("rpc")
        rpc_service.setServiceParent(services)

        yield services.startService()

        for elapsed, remaining, wait in retries(15, 1, reactor):
            try:
                yield getRegionClient()
            except NoConnectionsAvailable:
                yield pause(wait, reactor)
            else:
                break
        else:
            print("Can't connect to the region.", file=stderr)
            raise SystemExit(1)
示例#2
0
文件: plugin.py 项目: tjjh89017/maas
 def _makeRPCService(self):
     from provisioningserver.rpc.clusterservice import ClusterClientService
     rpc_service = ClusterClientService(reactor)
     rpc_service.setName("rpc")
     return rpc_service