def submit_task(self, taskid, splits): dependencies = self.tasks[taskid].dependencies for data in splits: taskitem = taskid, data, dependencies stream = self.NodeList.get(self.nodes.next(), None) if stream: stream.socket.send(util.serial(taskitem) + '\r\n')
def submit_task(self,taskid, splits): dependencies = self.tasks[taskid].dependencies for data in splits: taskitem = taskid,data,dependencies stream = self.NodeList.get(self.nodes.next(),None) if stream: stream.socket.send(util.serial(taskitem)+'\r\n')
def register(self): try: yield self.write(util.serial({"Register": True})) except Exception, e: print "register", e
def report_queue(self): if self.result_queue: result = self.result_queue.pop(0) self.write(util.serial(result)) ioloop.IOLoop.instance().add_timeout(0, self.report_queue)
def register(self): try: yield self.write(util.serial({"Register":True})) except Exception,e: print 'register',e
def report_queue(self): if self.result_queue: result = self.result_queue.pop(0) self.write(util.serial(result)) ioloop.IOLoop.instance().add_timeout(0,self.report_queue)