Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
fix: Delete retry to DB, not stable enough
Clémence Lesnéc2bfca94ab0b
diff --git a/persistence/ai_search.py b/persistence/ai_search.pyindex f259e55..96674c7 100644--- a/persistence/ai_search.py+++ b/persistence/ai_search.py@@ -9,7 +9,6 @@ from helpers.logging import build_loggerfrom models.training import TrainingModelfrom persistence.isearch import ISearchfrom pydantic import ValidationError-from tenacity import retry, stop_after_attempt, wait_random_exponentialfrom typing import AsyncGenerator, List, Optional@@ -64,9 +63,6 @@ class AiSearchSearch(ISearch):_logger.error(f"Error connecting to AI Search, {e.message}")return trainings or None- @retry(- stop=stop_after_attempt(3), wait=wait_random_exponential(multiplier=0.5, max=30)- )@asynccontextmanagerasync def _use_db(self) -> AsyncGenerator[SearchClient, None]:async with SearchClient(diff --git a/persistence/cosmos.py b/persistence/cosmos.pyindex ad6a804..bfb7f35 100644--- a/persistence/cosmos.py+++ b/persistence/cosmos.py@@ -10,7 +10,6 @@ from helpers.logging import build_loggerfrom models.call import CallModelfrom persistence.istore import IStorefrom pydantic import ValidationError-from tenacity import retry, stop_after_attempt, wait_random_exponentialfrom typing import AsyncGenerator, List, Optionalfrom uuid import UUID@@ -113,9 +112,6 @@ class CosmosStore(IStore):_logger.warn(f"Error parsing call, {e.message}")return calls or None- @retry(- stop=stop_after_attempt(3), wait=wait_random_exponential(multiplier=0.5, max=30)- )@asynccontextmanagerasync def _use_db(self) -> AsyncGenerator[ContainerProxy, None]:yield self._dbdiff --git a/persistence/sqlite.py b/persistence/sqlite.pyindex 65b1d69..9db662d 100644--- a/persistence/sqlite.py+++ b/persistence/sqlite.py@@ -7,7 +7,6 @@ from helpers.logging import build_loggerfrom models.call import CallModelfrom persistence.istore import IStorefrom pydantic import ValidationError-from tenacity import retry, stop_after_attempt, wait_random_exponentialfrom typing import AsyncGenerator, List, Optionalfrom uuid import UUIDimport json@@ -114,9 +113,6 @@ class SqliteStore(IStore):# Write changes to diskawait db.commit()- @retry(- stop=stop_after_attempt(3), wait=wait_random_exponential(multiplier=0.5, max=30)- )@asynccontextmanagerasync def _use_db(self) -> AsyncGenerator[SQLiteConnection, None]:# Create folder