@defer.inlineCallbacks
def get_retry_limiter(destination, clock, store, **kwargs):
    retry_last_ts, retry_interval = (0, 0)

    retry_timings = yield store.get_destination_retry_timings(
        destination
    )

    if retry_timings:
        retry_last_ts, retry_interval = (
            retry_timings["retry_last_ts"], retry_timings["retry_interval"]
        )

        now = int(clock.time_msec())

        if retry_last_ts + retry_interval > now:
            raise NotRetryingDestination(
                retry_last_ts=retry_last_ts,
                retry_interval=retry_interval,
                destination=destination,
            )

    defer.returnValue(
        RetryDestinationLimiter(
            destination,
            clock,
            store,
            retry_interval,
            **kwargs
        )
    )
Internal function called by zookeeper when child nodes are added to or removed from a node.
dataset/ETHPy150Open matrix-org/synapse/synapse/util/retryutils.py/get_retry_limiter--crossover with--dataset/ETHPy150Open liquidgecka/twitcher/twitcher/zkwrapper.py/ZKWrapper._children_watcher