Пример #1
0
 def get_data(self):
     while 1:
         print "get"
         #self.queueLock.acquire()
         if not self.q.empty():
             data = self.q.get()
             print data
             #pdb.set_trace()
             sendData_mh(self.sock_l, trans_l, json.dumps(data))
         #self.queueLock.release()
         time.sleep(self.interval)
Пример #2
0
 def get_data(self):
     while 1:
         print "get"
         #self.queueLock.acquire()
         if not self.q.empty():
             data = self.q.get()
             print data
             #pdb.set_trace()
             sendData_mh(self.sock_l, trans_l, json.dumps(data))
         #self.queueLock.release()
         time.sleep(self.interval)
Пример #3
0
 def get_data(self):
     while 1:
         print "get~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
         if not self.q.empty():
             data = self.q.get()
             print data
             while 1:
                 ret = sendData_mh(self.sock_l, trans_l, json.dumps(data))
                 print "Agent: trying to sendData_mh"
                 if ret == "OK" :
                     time.sleep(self.interval)
                     print "Agent: sendData_mh successfully"
                     break
                 else:
                     time.sleep(self.interval)
             else:
                 print "Agent: sendData_mh unsuccessfully"
                 continue
Пример #4
0
def transf(sock_l, host_l, data):
    return sendData_mh(sock_l, host_l, data)
Пример #5
0
def sendFf(d_in, ff_l):
    return sendData_mh(ff_sock_l, ff_l, d_in)
Пример #6
0
def sendSaver(d_in, saver_l):
    return sendData_mh(saver_sock_l, saver_l, d_in)
Пример #7
0
def sendFf(d_in, saver_l):
    return sendData_mh(ff_sock_l, ff_l, d_in)
Пример #8
0
def sendSaver(d_in, saver_l):
    return sendData_mh(saver_sock_l, saver_l, d_in)
Пример #9
0
def transf(sock_l,host_l,data):
    return sendData_mh(sock_l,host_l,data)