Load MINIO_SECURE from env and replace adapter asserts with explicit errors.
Default TLS to enabled for production MinIO setups while keeping local and integration tests on plain HTTP via explicit secure=false configuration. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
7991dabdbc
commit
3aa91280ec
@@ -34,11 +34,10 @@ class RedisAdapter(JsonRepositoryInterface, ConnectionAwareAdapter):
|
||||
client: redis.Redis | None = None,
|
||||
) -> None:
|
||||
super().__init__()
|
||||
if client is not None and config is None:
|
||||
raise ValueError("config is required when client is provided")
|
||||
if config is None and client is None:
|
||||
if config is None:
|
||||
if client is not None:
|
||||
raise ValueError("config is required when client is provided")
|
||||
config = RedisConfig.from_env(self.uri_env_var_name)
|
||||
assert config is not None
|
||||
self._config = config
|
||||
self._client_injected = client is not None
|
||||
self._client: redis.Redis | None = client
|
||||
|
||||
Reference in New Issue
Block a user