mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-20 13:05:49 +02:00
minor read replica fix (#3997)
This commit is contained in:
@@ -2,6 +2,7 @@ from typing import cast
|
|||||||
|
|
||||||
from ee.onyx.configs.app_configs import GATED_TENANTS_KEY
|
from ee.onyx.configs.app_configs import GATED_TENANTS_KEY
|
||||||
from onyx.configs.constants import ONYX_CLOUD_TENANT_ID
|
from onyx.configs.constants import ONYX_CLOUD_TENANT_ID
|
||||||
|
from onyx.redis.redis_pool import get_redis_client
|
||||||
from onyx.redis.redis_pool import get_redis_replica_client
|
from onyx.redis.redis_pool import get_redis_replica_client
|
||||||
from onyx.server.settings.models import ApplicationStatus
|
from onyx.server.settings.models import ApplicationStatus
|
||||||
from onyx.server.settings.store import load_settings
|
from onyx.server.settings.store import load_settings
|
||||||
@@ -13,7 +14,7 @@ logger = setup_logger()
|
|||||||
|
|
||||||
|
|
||||||
def update_tenant_gating(tenant_id: str, status: ApplicationStatus) -> None:
|
def update_tenant_gating(tenant_id: str, status: ApplicationStatus) -> None:
|
||||||
redis_client = get_redis_replica_client(tenant_id=ONYX_CLOUD_TENANT_ID)
|
redis_client = get_redis_client(tenant_id=ONYX_CLOUD_TENANT_ID)
|
||||||
|
|
||||||
# Store the full status
|
# Store the full status
|
||||||
status_key = f"tenant:{tenant_id}:status"
|
status_key = f"tenant:{tenant_id}:status"
|
||||||
|
Reference in New Issue
Block a user