clan-app: Fix delete tasks
clan-app: Fix delete tasks
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user