From 0c54a0f6de7430b7a2450befbd36452b81dc7c04 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Tue, 8 Jul 2025 17:58:49 +0700 Subject: [PATCH] clan-app: Fix delete tasks clan-app: Fix delete tasks --- pkgs/clan-app/clan_app/deps/webview/webview_bridge.py | 4 +++- pkgs/clan-cli/clan_lib/api/tasks.py | 2 +- pkgs/clan-cli/openapi.py | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/clan-app/clan_app/deps/webview/webview_bridge.py b/pkgs/clan-app/clan_app/deps/webview/webview_bridge.py index 1df505715..6c988ab30 100644 --- a/pkgs/clan-app/clan_app/deps/webview/webview_bridge.py +++ b/pkgs/clan-app/clan_app/deps/webview/webview_bridge.py @@ -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 diff --git a/pkgs/clan-cli/clan_lib/api/tasks.py b/pkgs/clan-cli/clan_lib/api/tasks.py index 0f856f322..7ba8e58d2 100644 --- a/pkgs/clan-cli/clan_lib/api/tasks.py +++ b/pkgs/clan-cli/clan_lib/api/tasks.py @@ -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) diff --git a/pkgs/clan-cli/openapi.py b/pkgs/clan-cli/openapi.py index f14af341d..bd6c280de 100644 --- a/pkgs/clan-cli/openapi.py +++ b/pkgs/clan-cli/openapi.py @@ -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" }