def _iflat_tasks_wti(self, status=None, op="==", nids=None, with_wti=True):
        """
        Generators that produces a flat sequence of task.
        if status is not None, only the tasks with the specified status are selected.
        nids is an optional list of node identifiers used to filter the tasks.

        Returns:
            (task, work_index, task_index) if with_wti is True else task
        """
        nids = as_set(nids)

        if status is None:
            for wi, work in enumerate(self):
                for ti, task in enumerate(work):
                    if nids and task.node_id not in nids: continue
                    if with_wti:
                        yield task, wi, ti
                    else:
                        yield task

        else:
            # Get the operator from the string.
            op = operator_from_str(op)

            # Accept Task.S_FLAG or string.
            status = Status.as_status(status)

            for wi, work in enumerate(self):
                for ti, task in enumerate(work):
                    if nids and task.node_id not in nids: continue
                    if op(task.status, status):
                        if with_wti:
                            yield task, wi, ti
                        else:
                            yield task
def _iflat_tasks_wti ( self , status = None , op = "==" , nids = None , with_wti = True ) : nids = as_set ( nids ) if status is None : for wi , work in enumerate ( self ) : for ti , task in enumerate ( work ) : if nids and task . node_id not in nids : continue if with_wti : yield task , wi , ti else : yield task else : op = operator_from_str ( op ) status = Status . as_status ( status ) for wi , work in enumerate ( self ) : for ti , task in enumerate ( work ) : if nids and task . node_id not in nids : continue if op ( task . status , status ) : if with_wti : yield task , wi , ti else : yield task
Generators that produces a flat sequence of task.
        if status is not None, only the tasks with the specified status are selected.
        nids is an optional list of node identifiers used to filter the tasks.

        Returns:
            (task, work_index, task_index) if with_wti is True else task