Fix redis ssl issues 4
This commit is contained in:
@@ -67,7 +67,9 @@ class DeliveryTrackingService:
|
||||
redis_host = getattr(self.config, 'REDIS_HOST', 'localhost')
|
||||
redis_port = getattr(self.config, 'REDIS_PORT', 6379)
|
||||
redis_db = getattr(self.config, 'REDIS_DB', 0)
|
||||
redis_url = f"redis://:{redis_password}@{redis_host}:{redis_port}/{redis_db}"
|
||||
# Use rediss:// for TLS connections (matches the shared config base)
|
||||
redis_protocol = "rediss" if getattr(self.config, 'REDIS_TLS_ENABLED', 'true').lower() == 'true' else "redis"
|
||||
redis_url = f"{redis_protocol}://:{redis_password}@{redis_host}:{redis_port}/{redis_db}"
|
||||
|
||||
# Create Redis connection using shared manager (handles SSL, pooling, health checks)
|
||||
self._redis_manager = await RedisConnectionManager.create(redis_url, decode_responses=False)
|
||||
|
||||
Reference in New Issue
Block a user