Ejemplo n.º 1
0
 def _on_complete_hook(self, my_task):
     context = my_task.workflow.get_task_spec_from_name(self.context)
     triggered = []
     for task in my_task.workflow.task_tree:
         if task.thread_id != my_task.thread_id:
             continue
         if task.task_spec == context:
             task.trigger(self.choice)
             triggered.append(task)
     for task in triggered:
         context._predict(task)
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 2
0
 def _on_complete_hook(self, my_task):
     context = my_task.workflow.get_task_spec_from_name(self.context)
     triggered = []
     for task in my_task.workflow.task_tree:
         if task.thread_id != my_task.thread_id:
             continue
         if task.task_spec == context:
             task.trigger(self.choice)
             triggered.append(task)
     for task in triggered:
         context._predict(task)
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 3
0
    def _on_complete_hook(self, my_task):
        """
        A hook into _on_complete() that does the task specific work.

        :type  my_task: Task
        :param my_task: A task in which this method is executed.
        :rtype:  bool
        :returns: True on success, False otherwise.
        """
        for i in range(self.times + self.queued):
            for task_name in self.context:
                task = my_task.workflow.get_task_spec_from_name(task_name)
                task._on_trigger(my_task)
        self.queued = 0
        TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 4
0
    def _on_complete_hook(self, my_task):
        """
        A hook into _on_complete() that does the task specific work.

        :type  my_task: Task
        :param my_task: A task in which this method is executed.
        :rtype:  bool
        :returns: True on success, False otherwise.
        """
        for i in range(self.times + self.queued):
            for task_name in self.context:
                task = my_task.workflow.get_task_spec_from_name(task_name)
                task._on_trigger(my_task)
        self.queued = 0
        TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 5
0
 def _on_complete_hook(self, my_task):
     context = my_task.workflow.get_task_spec_from_name(self.context)
     for task in my_task.workflow.task_tree:
         if task.thread_id != my_task.thread_id:
             continue
         if task.task_spec == context:
             task.trigger(self.choice)
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 6
0
 def _on_complete_hook(self, my_task):
     for task_name in self.context:
         cancel_tasks = my_task.workflow.get_task_spec_from_name(task_name)
         for cancel_task in my_task._get_root()._find_any(cancel_tasks):
             cancel_task.cancel()
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 7
0
 def _on_complete_hook(self, my_task):
     my_task._assign_new_thread_id()
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 8
0
 def _on_complete_hook(self, my_task):
     my_task.workflow.cancel(self.cancel_successfully)
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 9
0
 def _on_complete_hook(self, my_task):
     if self.transforms:
         for transform in self.transforms:
             exec(transform)
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 10
0
 def _on_complete_hook(self, my_task):
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 11
0
 def _on_complete_hook(self, my_task):
     my_task.workflow.cancel(self.cancel_successfully)
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 12
0
 def _on_complete_hook(self, my_task):
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 13
0
 def _on_complete_hook(self, my_task):
     if self.transforms:
         for transform in self.transforms:
             exec(transform)
     return TaskSpec._on_complete_hook(self, my_task)