update
This commit is contained in:
@@ -18,7 +18,7 @@ import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
from agents import kill_process
|
||||
from agents import kill_process, cancel_scope, clear_scope
|
||||
from config import KONSENS_GRACE, KONSENS_MAX_RUNDEN, DEFAULT_PROVIDER
|
||||
from fsutil import atomic_write_text, atomic_write_json
|
||||
from jsonio import read_json_file as _json_datei
|
||||
@@ -243,7 +243,8 @@ def cancel_bausteine(topic: str) -> bool:
|
||||
if topic not in _bausteine_progress:
|
||||
return False
|
||||
_bausteine_cancelled.add(topic)
|
||||
kill_process(f"bausteine-{topic}-")
|
||||
cancel_scope(f"bausteine-{topic}-") # wartende Agenten bailen vorm Spawn
|
||||
kill_process(f"bausteine-{topic}-") # laufende Subprozesse killen
|
||||
return True
|
||||
|
||||
|
||||
@@ -1473,3 +1474,4 @@ async def generate_bausteine(topic: str, instructions: str = "", provider: str =
|
||||
_bausteine_progress.pop(topic, None)
|
||||
_bausteine_step.pop(topic, None)
|
||||
_bausteine_cancelled.discard(topic)
|
||||
clear_scope(f"bausteine-{topic}-") # Scope leeren → Neustart blockiert nicht
|
||||
|
||||
Reference in New Issue
Block a user