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)
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
def transf(sock_l, host_l, data): return sendData_mh(sock_l, host_l, data)
def sendFf(d_in, ff_l): return sendData_mh(ff_sock_l, ff_l, d_in)
def sendSaver(d_in, saver_l): return sendData_mh(saver_sock_l, saver_l, d_in)
def sendFf(d_in, saver_l): return sendData_mh(ff_sock_l, ff_l, d_in)
def transf(sock_l,host_l,data): return sendData_mh(sock_l,host_l,data)