Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def env(
SENTRY_HYBRIDCLOUD_BACKFILL_OUTBOXES_REDIS_CLUSTER = "default"
SENTRY_WEEKLY_REPORTS_REDIS_CLUSTER = "default"
SENTRY_HYBRIDCLOUD_DELETIONS_REDIS_CLUSTER = "default"
SENTRY_SESSION_STORE_REDIS_CLUSTER = "default"

# Hosts that are allowed to use system token authentication.
# http://en.wikipedia.org/wiki/Reserved_IP_addresses
Expand Down
5 changes: 3 additions & 2 deletions src/sentry/utils/session_store.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from uuid import uuid4

import sentry_sdk
from django.conf import settings

from sentry.utils import redis
from sentry.utils.json import dumps, loads
from sentry.utils.redis import clusters

EXPIRATION_TTL = 10 * 60

Expand Down Expand Up @@ -57,7 +58,7 @@ def __init__(self, request, prefix, ttl=EXPIRATION_TTL):

@property
def _client(self):
return clusters.get("default").get_local_client_for_key(self.redis_key)
return redis.redis_clusters.get(settings.SENTRY_SESSION_STORE_REDIS_CLUSTER)

This comment was marked as off-topic.


@property
def session_key(self) -> str:
Expand Down
Loading