Ejemplo n.º 1
0
 def _on_complete_hook(self, my_task):
     """
     Runs the task. Should not be called directly.
     Returns True if completed, False otherwise.
     """
     my_task._assign_new_thread_id()
     return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 2
0
    def _on_complete_hook(self, my_task):
        """
        Runs the task. Should not be called directly.
        Returns True if completed, False otherwise.

        my_task -- the task in which this method is executed
        """
        return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 3
0
    def _on_complete_hook(self, my_task):
        """
        Runs the task. Should not be called directly.
        Returns True if completed, False otherwise.

        my_task -- the task in which this method is executed
        """
        mutex = my_task.job._get_mutex(self.mutex)
        mutex.unlock()
        return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 4
0
    def _on_complete_hook(self, my_task):
        """
        Runs the task. Should not be called directly.
        Returns True if completed, False otherwise.

        my_task -- the task in which this method is executed
        """
        for task_name in self.context:
            cancel_tasks = my_task.job.get_task_from_name(task_name)
            for cancel_task in my_task._get_root()._find_any(cancel_tasks):
                cancel_task.cancel()
        return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 5
0
    def _on_complete_hook(self, my_task):
        """
        Runs the task. Should not be called directly.
        Returns True if completed, False otherwise.

        my_task -- the task in which this method is executed
        """
        for i in range(self.times + self.queued):
            for task_name in self.context:
                task = my_task.job.get_task_from_name(task_name)
                task._on_trigger(my_task)
        self.queued = 0
        return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 6
0
    def _on_complete_hook(self, my_task):
        """
        Runs the task. Should not be called directly.
        Returns True if completed, False otherwise.

        my_task -- the task in which this method is executed
        """
        context = my_task.job.get_task_from_name(self.context)
        for task in my_task.job.task_tree:
            if task.thread_id != my_task.thread_id:
                continue
            if task.spec == context:
                task.trigger(self.choice)
        return TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 7
0
 def _on_complete_hook(self, my_task):
     mutex = my_task.workflow._get_mutex(self.mutex)
     mutex.unlock()
     TaskSpec._on_complete_hook(self, my_task)
Ejemplo n.º 8
0
 def _on_complete_hook(self, my_task):
     mutex = my_task.workflow._get_mutex(self.mutex)
     mutex.unlock()
     TaskSpec._on_complete_hook(self, my_task)