MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / get_running_task

Method get_running_task

camel/tasks/task.py:171–178  ·  view source on GitHub ↗

r"""Get RUNNING task.

(self)

Source from the content-addressed store, hash-verified

169 self.subtasks = [task for task in self.subtasks if task.id != id]
170
171 def get_running_task(self) -> Optional["Task"]:
172 r"""Get RUNNING task."""
173 for sub in self.subtasks:
174 if sub.state == TaskState.RUNNING:
175 return sub.get_running_task()
176 if self.state == TaskState.RUNNING:
177 return self
178 return None
179
180 def to_string(self, indent: str = "", state: bool = False) -> str:
181 r"""Convert task to a sting.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected