(self, domain: str, task_id: str)
| 597 | return self._domain_task_snapshot(task) |
| 598 | |
| 599 | def request_domain_task_resume(self, domain: str, task_id: str) -> Optional[Dict[str, Any]]: |
| 600 | with _domain_lock: |
| 601 | task = self._ensure_domain_task_locked(domain=domain, task_id=task_id) |
| 602 | status = str(task.get("status") or "").strip().lower() |
| 603 | if status in {"completed", "failed", "cancelled"}: |
| 604 | return self._domain_task_snapshot(task) |
| 605 | task["pause_requested"] = False |
| 606 | task["paused"] = False |
| 607 | if status == "paused": |
| 608 | task["status"] = "running" |
| 609 | task["message"] = "任务已继续执行" |
| 610 | return self._domain_task_snapshot(task) |
| 611 | |
| 612 | def is_domain_task_pause_requested(self, domain: str, task_id: str) -> bool: |
| 613 | with _domain_lock: |
no test coverage detected