Exemplo n.º 1
0
 def run(self):
     while True:
         try:
             import gevent
             gevent.sleep(10)
         except:
             break
     stop_pinpoint_agent()
     TCLogger.warning("collector agent exit with SIGNAL")
Exemplo n.º 2
0
 def start(self):
     self.__socket = asy_socket.socket(asy_socket.AF_INET,
                                       asy_socket.SOCK_DGRAM)
     self.__socket.setblocking(False)
     try:
         self.state = E_CONNECTED
         self.__socket.connect(self.remote)
     except asy_socket.error as e:
         if not (e.errno in (errno.EINPROGRESS, errno.EWOULDBLOCK)):
             TCLogger.warning("connect:%s error:%s" % (self.remote, str(e)))
             self.__socket.close()
             raise Exception("create DgramLayer failed")