Add 'url' property to Redis KV config

This commit is contained in:
Minutis 2024-10-05 17:06:43 +03:00
parent bfb0e92034
commit a569da8be3

View file

@ -31,6 +31,10 @@ class RedisKVStoreConfig(CommonConfig):
host: str = "localhost" host: str = "localhost"
port: int = 6379 port: int = 6379
@property
def url(self) -> str:
return f"redis://{self.host}:{self.port}"
class SqliteKVStoreConfig(CommonConfig): class SqliteKVStoreConfig(CommonConfig):
type: Literal[KVStoreType.sqlite.value] = KVStoreType.sqlite.value type: Literal[KVStoreType.sqlite.value] = KVStoreType.sqlite.value