app/src/k8s/__init__.py
async def wait_for_total_reconciliation(timeout: timedelta,
                                        *args: Union[
                                            Tuple[Predicate, Callable],
                                            Tuple[Predicate, Callable, List],
                                            Tuple[Predicate, Callable, Dict],
                                            Tuple[Predicate, Callable, List,
                                                  Dict]
                                        ]):
    """Waits until multiple fns satisfy some predicates.

    Takes a list of parameters for wait_for_reconciliation as Tuples and waits
    until wither all of them reconcile or a timeout is reached.

    Args:
        timeout: Time to wait for predicate to be satisfied.
        *args: List of parameters for wait_for_reconciliation as Tuples.

    Raises:
        ReconciliationError:
            If the predicates were not satisfied within timeout.
    """
    tasks = []
    for poll_args in args:
        poll_args = list(poll_args)  # tuples are immutable
        list_arg = [] if len(poll_args) < 4 else poll_args[2]
        kw_arg = dict() if len(poll_args) < 4 else poll_args[3]

        if len(poll_args) == 3:
            if type(poll_args[2]) is dict:
                kw_arg = poll_args[2]
            elif type(poll_args[2]) is list:
                list_arg = poll_args[2]

        tasks.append(_poll_resource(poll_args[0], poll_args[1], *list_arg,
                                    **kw_arg))

    poll_all = asyncio.gather(*tasks)
    try:
        await asyncio.wait_for(poll_all, timeout=timeout.seconds)
    except TimeoutError:
        raise ReconciliationError
Waits until multiple fns satisfy some predicates.

    Takes a list of parameters for wait_for_reconciliation as Tuples and waits
    until wither all of them reconcile or a timeout is reached.

    Args:
        timeout: Time to wait for predicate to be satisfied.
        *args: List of parameters for wait_for_reconciliation as Tuples.

    Raises:
        ReconciliationError:
            If the predicates were not satisfied within timeout.
    
Waits until multiple fns satisfy some predicates.
Takes a list of parameters for wait_for_reconciliation as Tuples and waits
until wither all of them reconcile or a timeout is reached.
Waits until multiple fns satisfy some predicates . Takes a list of parameters for wait_for_reconciliation as Tuples and waits until wither all of them reconcile or a timeout is reached .
async def wait_for_total_reconciliation(timeout: timedelta,
                                        *args: Union[
                                            Tuple[Predicate, Callable],
                                            Tuple[Predicate, Callable, List],
                                            Tuple[Predicate, Callable, Dict],
                                            Tuple[Predicate, Callable, List,
                                                  Dict]
                                        ]):
    tasks = []
    for poll_args in args:
        poll_args = list(poll_args)  
        list_arg = [] if len(poll_args) < 4 else poll_args[2]
        kw_arg = dict() if len(poll_args) < 4 else poll_args[3]
        if len(poll_args) == 3:
            if type(poll_args[2]) is dict:
                kw_arg = poll_args[2]
            elif type(poll_args[2]) is list:
                list_arg = poll_args[2]
        tasks.append(_poll_resource(poll_args[0], poll_args[1], *list_arg,
                                    **kw_arg))
    poll_all = asyncio.gather(*tasks)
    try:
        await asyncio.wait_for(poll_all, timeout=timeout.seconds)
    except TimeoutError:
        raise ReconciliationError
async def wait_for_total_reconciliation ( timeout : timedelta , * args : Union [ Tuple [ Predicate , Callable ] , Tuple [ Predicate , Callable , List ] , Tuple [ Predicate , Callable , Dict ] , Tuple [ Predicate , Callable , List , Dict ] ] ) : tasks = [ ] for poll_args in args : poll_args = list ( poll_args ) list_arg = [ ] if len ( poll_args ) < 4 else poll_args [ 2 ] kw_arg = dict ( ) if len ( poll_args ) < 4 else poll_args [ 3 ] if len ( poll_args ) == 3 : if type ( poll_args [ 2 ] ) is dict : kw_arg = poll_args [ 2 ] elif type ( poll_args [ 2 ] ) is list : list_arg = poll_args [ 2 ] tasks . append ( _poll_resource ( poll_args [ 0 ] , poll_args [ 1 ] , * list_arg , ** kw_arg ) ) poll_all = asyncio . gather ( * tasks ) try : await asyncio . wait_for ( poll_all , timeout = timeout . seconds ) except TimeoutError : raise ReconciliationError
Waits until multiple fns satisfy some predicates.
Waits until multiple fns satisfy some predicates .
"""Waits until multiple fns satisfy some predicates.

    Takes a list of parameters for wait_for_reconciliation as Tuples and waits
    until wither all of them reconcile or a timeout is reached.

    Args:
        timeout: Time to wait for predicate to be satisfied.
        *args: List of parameters for wait_for_reconciliation as Tuples.

    Raises:
        ReconciliationError:
            If the predicates were not satisfied within timeout.
    """ # tuples are immutable
If the predicates were not satisfied within timeout.
If the predicates were not satisfied within timeout .
ReconciliationError
timeout
timedelta
Time to wait for predicate to be satisfied.
Time to wait for predicate to be satisfied .
args
Union[
                                            Tuple[Predicate, Callable],
                                            Tuple[Predicate, Callable, List],
                                            Tuple[Predicate, Callable, Dict],
                                            Tuple[Predicate, Callable, List,
                                                  Dict]
                                        ]
*args
List of parameters for wait_for_reconciliation as Tuples.
List of parameters for wait_for_reconciliation as Tuples .