Example #1
0
 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')
Example #2
0
 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')
Example #3
0
 def register(self):
     try:
         yield self.write(util.serial({"Register": True}))
     except Exception, e:
         print "register", e
Example #4
0
 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)
Example #5
0
 def register(self):
     try:
         yield self.write(util.serial({"Register":True}))
     except Exception,e:
         print 'register',e
Example #6
0
 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)