Module ImportFrom alias ImportFrom alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Str Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr If CompareGt BinOpAdd NameLoad NameLoad NameLoad body Raise Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults BinOpMult BinOpMult Num Num Num BinOpMult BinOpMult BinOpMult Num Num Num Num Num body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore CompareLtELt Num AttributeLoad NameLoad attr Num If BoolOpOr CompareIs NameLoad NameLoad NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Return Assign NameStore Num Assign AttributeStore NameLoad attr Num orelse If AttributeLoad NameLoad attr body AugAssignMult AttributeStore NameLoad attr AttributeLoad NameLoad attr AugAssignMult AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Num Num If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A twisted.internet defer synapse.api.errors CodeMessageException N/A logging N/A random N/A logger N/A N/A logging getLogger __name__ NotRetryingDestination N/A Exception N/A __init__ N/A N/A self retry_last_ts retry_interval destination N/A N/A N/A msg N/A Not retrying server %s. N/A destination N/A N/A N/A N/A super NotRetryingDestination self __init__ msg N/A N/A self retry_last_ts retry_last_ts N/A N/A self retry_interval retry_interval N/A N/A self destination destination N/A N/A get_retry_limiter N/A N/A destination clock store N/A kwargs N/A N/A For a given destination check if we have previously failed to
    send a request there and are waiting before retrying the destination.
    If we are not ready to retry the destination, this will raise a
    NotRetryingDestination exception. Otherwise, will return a Context Manager
    that will mark the destination as down if an exception is thrown (excluding
    CodeMessageException with code < 500)

    Example usage:

        try:
            limiter = yield get_retry_limiter(destination, clock, store)
            with limiter:
                response = yield do_request()
        except NotRetryingDestination:
            # We aren't ready to retry that destination.
            raise
     N/A N/A retry_last_ts retry_interval N/A 0 0 N/A retry_timings N/A N/A N/A store get_destination_retry_timings destination N/A retry_timings N/A N/A N/A retry_last_ts retry_interval N/A N/A retry_timings N/A retry_last_ts N/A retry_timings N/A retry_interval N/A now N/A int N/A N/A clock time_msec N/A N/A N/A retry_last_ts retry_interval now N/A N/A N/A NotRetryingDestination retry_last_ts retry_last_ts retry_interval retry_interval destination destination N/A N/A N/A defer returnValue N/A RetryDestinationLimiter destination clock store retry_interval kwargs N/A N/A defer inlineCallbacks RetryDestinationLimiter N/A object N/A __init__ N/A N/A self destination clock store retry_interval min_retry_interval max_retry_interval multiplier_retry_interval N/A N/A N/A 10 60 1000 N/A N/A N/A 24 60 60 1000 5 N/A N/A Marks the destination as "down" if an exception is thrown in the
        context, except for CodeMessageException with code < 500.

        If no exception is raised, marks the destination as "up".

        Args:
            destination (str)
            clock (Clock)
            store (DataStore)
            retry_interval (int): The next retry interval taken from the
                database in milliseconds, or zero if the last request was
                successful.
            min_retry_interval (int): The minimum retry interval to use after
                a failed request, in milliseconds.
            max_retry_interval (int): The maximum retry interval to use after
                a failed request, in milliseconds.
            multiplier_retry_interval (int): The multiplier to use to increase
                the retry interval after a failed request.
         N/A N/A self clock clock N/A N/A self store store N/A N/A self destination destination N/A N/A self retry_interval retry_interval N/A N/A self min_retry_interval min_retry_interval N/A N/A self max_retry_interval max_retry_interval N/A N/A self multiplier_retry_interval multiplier_retry_interval N/A __enter__ N/A N/A self N/A N/A N/A N/A __exit__ N/A N/A self exc_type exc_val exc_tb N/A N/A err N/A N/A failure N/A N/A N/A N/A N/A logger exception Failed to store set_destination_retry_timings N/A failure value N/A N/A valid_err_code False N/A N/A exc_type CodeMessageException N/A N/A valid_err_code N/A 0 N/A exc_val code 500 N/A N/A N/A exc_type None valid_err_code N/A N/A N/A N/A self retry_interval N/A N/A N/A retry_last_ts 0 N/A N/A self retry_interval 0 N/A N/A N/A self retry_interval N/A N/A N/A self retry_interval N/A self multiplier_retry_interval N/A N/A self retry_interval N/A int N/A N/A random uniform 0.8 1.4 N/A N/A N/A self retry_interval N/A self max_retry_interval N/A N/A N/A self retry_interval N/A self max_retry_interval N/A N/A N/A self retry_interval N/A self min_retry_interval N/A retry_last_ts N/A int N/A N/A N/A self clock time_msec N/A N/A N/A N/A N/A N/A self store set_destination_retry_timings N/A self destination retry_last_ts N/A self retry_interval addErrback err N/A N/A