fix(archivar): replace asyncio.to_thread with run_in_executor in _llm_room_lookup
This commit is contained in:
@@ -598,8 +598,9 @@ class BidirectionalRouter:
|
|||||||
# Try LLM — expects room ID directly
|
# Try LLM — expects room ID directly
|
||||||
# Semaphore schützt vor parallelen Ollama-Aufrufen (qwen2.5:7b = single-request)
|
# Semaphore schützt vor parallelen Ollama-Aufrufen (qwen2.5:7b = single-request)
|
||||||
async with self._llm_semaphore:
|
async with self._llm_semaphore:
|
||||||
llm_result = await asyncio.to_thread(
|
loop = asyncio.get_running_loop()
|
||||||
self._classifier._llm_raw_sync, prompt
|
llm_result = await loop.run_in_executor(
|
||||||
|
None, self._classifier._llm_raw_sync, prompt
|
||||||
)
|
)
|
||||||
if llm_result is None:
|
if llm_result is None:
|
||||||
return None, True # LLM-Aufruf fehlgeschlagen
|
return None, True # LLM-Aufruf fehlgeschlagen
|
||||||
|
|||||||
Reference in New Issue
Block a user