コード例 #1
0
 def __call__(self, h_j):
     msg("Calling:\t%s" % (str(self),))
     # Get the handler linked to the 'self' job
     handler = h_j.obj1_lookup(self)
     # onstart_job event
     handler.onstart_job()
     self.runner()
     if len(self.children) > 0:
         # onstart_children event
         handler.onstart_children()
         for child in self.children:
             try:
                 # onstart_child event
                 handler.onstart_child()
                 child(h_j)
                 # onstop_child event
                 handler.onstop_child()
             except JobException as exc:
                 exc_handled = self.exc_handler(exc)
                 if  (exc_handled is True) or (not exc_handled is None):
                     raise exc_handled
         # onstop_children event
         handler.onstop_children()
     # onstop_job event
     handler.onstop_job()
コード例 #2
0
 def root_runner(self):
     msg("Root job executed")