Example #1
0
 def connectRet(self):
     while self.connectedRet == False:
         try:
             QueueManager.register('result')
             manager = QueueManager(address=(self.server_addr, 9113), authkey=b'dihuge')
             manager.connect()
             self.ret_sender = manager.result()
             self.connectedRet = True
         except Exception as e:
             print('Ret_ConnectRefuseRec', e)
             time.sleep(1)
Example #2
0
 def connectRet(self):
     # 结果队列
     self.connectedRet = True
     #server_addr = '0.0.0.0'
     server_addr = self.server_addr
     # 检测结果队列
     self.ret_queue = Queue()
     QueueManager.register('result', callable=lambda: self.ret_queue)
     camcolor_manager = QueueManager(address=(server_addr, 9113),
                                     authkey=b'dihuge')
     try:
         camcolor_manager.start()
     except Exception as e:
         print(e)
         camcolor_manager.connect()
     self.ret_sender = camcolor_manager.result()