[SKY-6] Backend: Enable 2FA code detection without TOTP credentials (#4786)

This commit is contained in:
Aaron Perez
2026-02-18 17:21:58 -05:00
committed by GitHub
parent b48bf707c3
commit e3b6d22fb6
28 changed files with 1989 additions and 41 deletions

View File

@@ -0,0 +1,21 @@
from __future__ import annotations
from redis.asyncio import Redis
class RedisClientFactory:
"""Singleton factory for a shared async Redis client.
Follows the same static set/get pattern as ``CacheFactory``.
Defaults to ``None`` (no Redis in local/OSS mode).
"""
__client: Redis | None = None
@staticmethod
def set_client(client: Redis) -> None:
RedisClientFactory.__client = client
@staticmethod
def get_client() -> Redis | None:
return RedisClientFactory.__client