(self, domain: str, task_id: str)
| 571 | return [self._domain_task_snapshot(item) for item in tasks[:safe_limit]] |
| 572 | |
| 573 | def request_domain_task_cancel(self, domain: str, task_id: str) -> Optional[Dict[str, Any]]: |
| 574 | with _domain_lock: |
| 575 | task = self._ensure_domain_task_locked(domain=domain, task_id=task_id) |
| 576 | task["cancel_requested"] = True |
| 577 | if str(task.get("status") or "").lower() in {"pending", "running"}: |
| 578 | task["message"] = "已提交取消请求,等待任务结束" |
| 579 | return self._domain_task_snapshot(task) |
| 580 | |
| 581 | def is_domain_task_cancel_requested(self, domain: str, task_id: str) -> bool: |
| 582 | with _domain_lock: |
no test coverage detected