()
return ret
This returns a dict mapping DB alias to max replication delay.
    Note: this assigns a default value to any DB that does not have
    an explicit value set (including master databases).
This returns a dict mapping DB alias to max replication delay.
    Note: this assigns a default value to any DB that does not have
    an explicit value set (including master databases).
This returns a dict mapping DB alias to max replication delay . Note : this assigns a default value to any DB that does not have an explicit value set ( including master databases ) .
def get_acceptible_replication_delays():
    """This returns a dict mapping DB alias to max replication delay.
    Note: this assigns a default value to any DB that does not have
    an explicit value set (including master databases)."""
    ret = {}
    for db_, config in settings.DATABASES.items():
        delay = config.get('STANDBY', {}).get('ACCEPTABLE_REPLICATION_DELAY')
        if delay is None:
            # try legacy setting
            delay = config.get('HQ_ACCEPTABLE_STANDBY_DELAY')
            if delay is None:
                delay = ACCEPTABLE_STANDBY_DELAY_SECONDS

        ret[db_] = delay
    return ret
def get_acceptible_replication_delays ( ) : ret = { } for db_ , config in settings . DATABASES . items ( ) : delay = config . get ( 'STANDBY' , { } ) . get ( 'ACCEPTABLE_REPLICATION_DELAY' ) if delay is None : # try legacy setting delay = config . get ( 'HQ_ACCEPTABLE_STANDBY_DELAY' ) if delay is None : delay = ACCEPTABLE_STANDBY_DELAY_SECONDS ret [ db_ ] = delay return ret