deply: FIX redis problem with distroless deployment
This commit is contained in:
parent
fc1be4e278
commit
27f61aa94f
2 changed files with 19 additions and 16 deletions
4
app.py
4
app.py
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue