jnpr/space/async.py
def wait_for_tasks(self, task_id_list):
        """
        Waits for all the tasks in the given list to complete by periodically
        pulling progress-update messages from the hornet-q and checking if the
        message indicates that any of the given tasks is Done. The time between
        consecutive pulls is the value given as the ``wait_time`` argument in
        the constructor.

        The maximum number of consecutive pulls is determined by the
        ``max_consecutive_attempts`` argument in the constructor. If we're
        unable to pull a progress-update message from hornet-q after this many
        consecutive attempts, we will consider the tasks as hanging and this
        method will raise an Exception.

        :returns:  A list of progress-update messages indicating the completion
            state and status of all the given tasks. Each entry in the list is
            a Python object representing the final progress-update message for
            a task. The ``data`` attribute of this object will contain the full
            result from the task.
        """

        num_consecutive_attempts = 0
        task_results = []

        while len(task_results) < len(task_id_list):
            message = self.pull_message()
            if message is None:
                num_consecutive_attempts += 1
                if num_consecutive_attempts > self.max_consecutive_attempts:
                    break

                time.sleep(self.wait_time)
                continue
            else:
                num_consecutive_attempts = 0

            if message.taskId in task_id_list:
                if self._task_is_done(message):
                    task_results.append(self.get_final_progress_update(message))

        return task_results

        Waits for all the tasks in the given list to complete by periodically
        pulling progress-update messages from the hornet-q and checking if the
        message indicates that any of the given tasks is Done. The time between
        consecutive pulls is the value given as the ``wait_time`` argument in
        the constructor.

        The maximum number of consecutive pulls is determined by the
        ``max_consecutive_attempts`` argument in the constructor. If we're
        unable to pull a progress-update message from hornet-q after this many
        consecutive attempts, we will consider the tasks as hanging and this
        method will raise an Exception.

        :returns:  A list of progress-update messages indicating the completion
            state and status of all the given tasks. Each entry in the list is
            a Python object representing the final progress-update message for
            a task. The ``data`` attribute of this object will contain the full
            result from the task.
        
Waits for all the tasks in the given list to complete by periodically
pulling progress-update messages from the hornet-q and checking if the
message indicates that any of the given tasks is Done. The time between
consecutive pulls is the value given as the ``wait_time`` argument in
the constructor.

The maximum number of consecutive pulls is determined by the
``max_consecutive_attempts`` argument in the constructor. If we're
unable to pull a progress-update message from hornet-q after this many
consecutive attempts, we will consider the tasks as hanging and this
method will raise an Exception.
Waits for all the tasks in the given list to complete by periodically pulling progress - update messages from the hornet - q and checking if the message indicates that any of the given tasks is Done . The time between consecutive pulls is the value given as the ` ` wait_time ` ` argument in the constructor . The maximum number of consecutive pulls is determined by the ` ` max_consecutive_attempts ` ` argument in the constructor . If we ' re unable to pull a progress - update message from hornet - q after this many consecutive attempts we will consider the tasks as hanging and this method will raise an Exception .
def wait_for_tasks(self, task_id_list):
        num_consecutive_attempts = 0
        task_results = []
        while len(task_results) < len(task_id_list):
            message = self.pull_message()
            if message is None:
                num_consecutive_attempts += 1
                if num_consecutive_attempts > self.max_consecutive_attempts:
                    break
                time.sleep(self.wait_time)
                continue
            else:
                num_consecutive_attempts = 0
            if message.taskId in task_id_list:
                if self._task_is_done(message):
                    task_results.append(self.get_final_progress_update(message))
        return task_results
def wait_for_tasks ( self , task_id_list ) : num_consecutive_attempts = 0 task_results = [ ] while len ( task_results ) < len ( task_id_list ) : message = self . pull_message ( ) if message is None : num_consecutive_attempts += 1 if num_consecutive_attempts > self . max_consecutive_attempts : break time . sleep ( self . wait_time ) continue else : num_consecutive_attempts = 0 if message . taskId in task_id_list : if self . _task_is_done ( message ) : task_results . append ( self . get_final_progress_update ( message ) ) return task_results
Waits for all the tasks in the given list to complete by periodically
pulling progress-update messages from the hornet-q and checking if the
message indicates that any of the given tasks is Done.
Waits for all the tasks in the given list to complete by periodically pulling progress - update messages from the hornet - q and checking if the message indicates that any of the given tasks is Done .
"""
        Waits for all the tasks in the given list to complete by periodically
        pulling progress-update messages from the hornet-q and checking if the
        message indicates that any of the given tasks is Done. The time between
        consecutive pulls is the value given as the ``wait_time`` argument in
        the constructor.

        The maximum number of consecutive pulls is determined by the
        ``max_consecutive_attempts`` argument in the constructor. If we're
        unable to pull a progress-update message from hornet-q after this many
        consecutive attempts, we will consider the tasks as hanging and this
        method will raise an Exception.

        :returns:  A list of progress-update messages indicating the completion
            state and status of all the given tasks. Each entry in the list is
            a Python object representing the final progress-update message for
            a task. The ``data`` attribute of this object will contain the full
            result from the task.
        """
A list of progress-update messages indicating the completion
state and status of all the given tasks. Each entry in the list is
a Python object representing the final progress-update message for
a task. The ``data`` attribute of this object will contain the full
result from the task.
A list of progress - update messages indicating the completion state and status of all the given tasks . Each entry in the list is a Python object representing the final progress - update message for a task . The ` ` data ` ` attribute of this object will contain the full result from the task .
self
task_id_list