Spaces:
Paused
Paused
| # app/redis_client.py β Lazy Singleton (No Startup Crash) | |
| from app.deps import get_redis | |
| # Export the singleton instance (lazy, doesn't connect until first use) | |
| redis = get_redis() | |
| # β REMOVE: Don't ping on import - causes startup race condition | |
| # try: | |
| # redis.ping() | |
| # print("β Redis bridge connected") | |
| # except Exception as e: | |
| # print(f"β Redis connection failed: {e}") | |
| # raise RuntimeError(f"Redis not available: {e}") |