[SKY-6] Backend: Enable 2FA code detection without TOTP credentials (#4786)
This commit is contained in:
21
skyvern/forge/sdk/redis/factory.py
Normal file
21
skyvern/forge/sdk/redis/factory.py
Normal 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
|
||||
Reference in New Issue
Block a user