MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / resume

Method resume

server/services/process_manager.py:466–487  ·  view source on GitHub ↗

Resume a paused agent. Returns: Tuple of (success, message)

(self)

Source from the content-addressed store, hash-verified

464 return False, f"Failed to pause agent: {e}"
465
466 async def resume(self) -> tuple[bool, str]:
467 """
468 Resume a paused agent.
469
470 Returns:
471 Tuple of (success, message)
472 """
473 if not self.process or self.status != "paused":
474 return False, "Agent is not paused"
475
476 try:
477 proc = psutil.Process(self.process.pid)
478 proc.resume()
479 self.status = "running"
480 return True, "Agent resumed"
481 except psutil.NoSuchProcess:
482 self.status = "crashed"
483 self._remove_lock()
484 return False, "Agent process no longer exists"
485 except Exception as e:
486 logger.exception("Failed to resume agent")
487 return False, f"Failed to resume agent: {e}"
488
489 async def healthcheck(self) -> bool:
490 """

Callers 1

resume_agentFunction · 0.80

Calls 1

_remove_lockMethod · 0.95

Tested by

no test coverage detected