fix Qdrant

This commit is contained in:
2026-06-18 12:25:15 +03:00
parent b4cc07b9f8
commit 99565ca107
3 changed files with 15 additions and 3 deletions
+3 -2
View File
@@ -1,7 +1,6 @@
import asyncio
import json
import logging
import threading
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timezone
from typing import Any
@@ -23,6 +22,8 @@ DEFAULT_PROFILE: dict[str, Any] = {
logger = logging.getLogger(__name__)
_RAG_EXECUTOR = ThreadPoolExecutor(max_workers=2, thread_name_prefix="rag")
class MemoryService:
def __init__(self, db: Session, user_id: int):
@@ -47,7 +48,7 @@ class MemoryService:
except Exception:
logger.exception("RAG background task failed")
threading.Thread(target=runner, daemon=True).start()
_RAG_EXECUTOR.submit(runner)
@staticmethod
def _rag_fact_payload(fact: MemoryFact) -> dict[str, Any]: