fix(archivar): replace asyncio.to_thread with run_in_executor in _llm_room_lookup

This commit is contained in:
Bernd (Hermes)
2026-06-17 20:21:29 +02:00
parent ea96ebbde7
commit c590b8a53a
+3 -2
View File
@@ -598,8 +598,9 @@ class BidirectionalRouter:
# Try LLM — expects room ID directly
# Semaphore schützt vor parallelen Ollama-Aufrufen (qwen2.5:7b = single-request)
async with self._llm_semaphore:
llm_result = await asyncio.to_thread(
self._classifier._llm_raw_sync, prompt
loop = asyncio.get_running_loop()
llm_result = await loop.run_in_executor(
None, self._classifier._llm_raw_sync, prompt
)
if llm_result is None:
return None, True # LLM-Aufruf fehlgeschlagen