clan-app: Make http server non blocking, add tests for the http server and for cancelling tasks

This commit is contained in:
Qubasa
2025-07-10 17:21:18 +07:00
parent 70eb67ffd2
commit 695141b2ae
6 changed files with 38 additions and 41 deletions

View File

@@ -23,6 +23,7 @@ def delete_task(task_id: str) -> None:
"""Cancel a task by its op_key."""
assert BAKEND_THREADS is not None, "Backend threads not initialized"
future = BAKEND_THREADS.get(task_id)
log.debug(f"Thread ID: {threading.get_ident()}")
if future:
future.stop_event.set()