Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

perf: Enlarge DB connexion timeouts

Clémence Lesné98dda8001418
diff --git a/persistence/cosmos.py b/persistence/cosmos.py
index 75d3193..52abdd8 100644
--- a/persistence/cosmos.py
+++ b/persistence/cosmos.py
@@ -119,7 +119,7 @@ class CosmosStore(IStore):
async def _use_db(self) -> AsyncGenerator[ContainerProxy, None]:
client = CosmosClient(
# Reliability
- connection_timeout=5,
+ connection_timeout=10,
consistency_level="BoundedStaleness",
# Azure deployment
url=self._config.endpoint,
diff --git a/persistence/redis.py b/persistence/redis.py
index 9d04c2e..5799739 100644
--- a/persistence/redis.py
+++ b/persistence/redis.py
@@ -54,7 +54,7 @@ class RedisCache(ICache):
# Reliability
retry_on_error=[BusyLoadingError, ConnectionError, TimeoutError],
retry=_retry,
- socket_connect_timeout=5,
+ socket_connect_timeout=10,
# Azure deployment
host=self._config.host,
port=self._config.port,