clan-app: Fix delete tasks

clan-app: Fix delete tasks
This commit is contained in:
Qubasa
2025-07-08 17:58:49 +07:00
parent 60263bac8a
commit 0c54a0f6de
3 changed files with 4 additions and 3 deletions

View File

@@ -75,7 +75,9 @@ class WebviewBridge(ApiBridge):
)
except Exception as e:
msg = f"Error while handling webview call {method_name} with op_key {op_key_bytes}"
msg = (
f"Error while handling webview call {method_name} with op_key {op_key}"
)
log.exception(msg)
self.send_error_response(op_key, str(e), ["webview_bridge", method_name])
return

View File

@@ -19,7 +19,7 @@ BAKEND_THREADS: dict[str, WebThread] | None = None
@API.register
def cancel_task(task_id: str) -> None:
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)

View File

@@ -26,7 +26,6 @@ COMMON_VERBS = {
"open", # initiate session, shell, file, etc.
"check", # validate, probe, or assert
"run", # start imperative task or action; machine-deploy etc.
"cancel"
}