Первый коммит

This commit is contained in:
2026-02-25 14:47:19 +03:00
commit 43c404f958
171 changed files with 4917 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import time
from app.modules.shared.checkpointer import get_checkpointer
def bootstrap_database(rag_repository, chat_repository, agent_repository) -> None:
last_error: Exception | None = None
for attempt in range(1, 16):
try:
rag_repository.ensure_tables()
chat_repository.ensure_tables()
agent_repository.ensure_tables()
get_checkpointer()
return
except Exception as exc: # noqa: BLE001
last_error = exc
if attempt == 15:
break
time.sleep(1)
assert last_error is not None
raise last_error