MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / request_domain_task_pause

Method request_domain_task_pause

src/web/task_manager.py:586–597  ·  view source on GitHub ↗
(self, domain: str, task_id: str)

Source from the content-addressed store, hash-verified

584 return bool(task and task.get("cancel_requested"))
585
586 def request_domain_task_pause(self, domain: str, task_id: str) -> Optional[Dict[str, Any]]:
587 with _domain_lock:
588 task = self._ensure_domain_task_locked(domain=domain, task_id=task_id)
589 status = str(task.get("status") or "").strip().lower()
590 if status in {"completed", "failed", "cancelled"}:
591 return self._domain_task_snapshot(task)
592 task["pause_requested"] = True
593 task["paused"] = True
594 if status in {"pending", "running", "paused"}:
595 task["status"] = "paused"
596 task["message"] = "任务已暂停,等待继续"
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:

Callers 1

pause_unified_taskFunction · 0.80

Calls 3

_domain_task_snapshotMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected