def __init__(self, **options): self.is_redis_cluster, self.cluster, options = get_dynamic_cluster_from_options( "SENTRY_QUOTA_OPTIONS", options) # Based on the `is_redis_cluster` flag, self.cluster is set two one of # the following two objects: # - false: `cluster` is a `RBCluster`. Call `get_local_client_for_key` # on the cluster to resolve a client to run a script or query a key. # - true: `cluster` is a `RedisCluster`. It automatically dispatches to # the correct node and can be used as a client directly. super(RedisQuota, self).__init__(**options) self.namespace = "quota"
def __init__(self, **options): self.is_redis_cluster, self.cluster, options = get_dynamic_cluster_from_options( "SENTRY_RELAY_PROJECTCONFIG_CACHE_OPTIONS", options ) super().__init__(**options)
def __init__(self, **options): self.is_redis_cluster, self.cluster, options = get_dynamic_cluster_from_options( "SENTRY_RELAY_PROJECTCONFIG_DEBOUNCE_CACHE_OPTIONS", options) super(RedisProjectConfigDebounceCache, self).__init__(**options)