deply: FIX redis problem with distroless deployment

This commit is contained in:
Caffeine Fueled 2026-05-25 03:23:06 +02:00
parent fc1be4e278
commit 27f61aa94f
Signed by: cf7
GPG key ID: CA295D643074C68C
2 changed files with 19 additions and 16 deletions

4
app.py
View file

@ -68,8 +68,8 @@ def init_valkey():
redis_client = redis.from_url(VALKEY_URL, decode_responses=True)
redis_client.ping() # Test connection
print(f"Valkey/Redis connected: {VALKEY_URL}")
except ImportError:
print("Warning: redis package not installed, falling back to memory-only storage")
except ImportError as e:
print(f"Warning: redis package import failed ({e}), falling back to memory-only storage")
redis_client = None
except Exception as e:
print(f"Warning: Failed to connect to Valkey/Redis: {e}")