Exemplo n.º 1
0
 def die(self, message):
     log.debug("%s:die(%r)", self.__class__.__name__, message)
     evt = event.warning("Giving Up. Reason: %s" % message)
     self.task.proc_input(evt)
     evt = event.end(self.task_id, -1)
     self.task.proc_input(evt)
     self.release()
Exemplo n.º 2
0
 def die(self, message):
     log.debug("%s:die(%r)", self.__class__.__name__, message)
     evt = event.warning("Giving Up. Reason: %s" % message)
     self.task.proc_input(evt)
     evt = event.end(self.task_id, -1)
     self.task.proc_input(evt)
     self.release()
Exemplo n.º 3
0
 def task_finished(self, task, rc, evt=None):
     if self.rebooting:
         # If we're in the middle of a reboot, we don't want the task
         # to be marked as "done", because we need to start it up again
         # after the reboot
         log.info("Task %s has finished, not marking it as done due to reboot.",
                  task.task_id)
     else:
         self.generate_evt(evt or event.end(task.task_id, rc))
         self.remove_task(task)
         task.set_controller()
         master = self.get_master(task.task_id)
         if master:
             master.set_done(True, rc)
             log.info("Task %s has finished. Marking it as done.", task.task_id)
     log_flush(log)
Exemplo n.º 4
0
 def end(self, exit_code=0):
     return self.send(event.end(self.id(), exit_code))
Exemplo n.º 5
0
 def end(self, exit_code=0):
     return self.send(event.end(self.id(), exit_code))