MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _wait

Method _wait

src/background/tasks.py:48–61  ·  view source on GitHub ↗
(self, tid: str, proc: subprocess.Popen)

Source from the content-addressed store, hash-verified

46 return task
47
48 def _wait(self, tid: str, proc: subprocess.Popen) -> None:
49 out = ""
50 try:
51 out, _ = proc.communicate()
52 except Exception: # noqa: BLE001
53 pass
54 with self._lock:
55 t = self._tasks.get(tid)
56 if t is not None:
57 t.output = (out or "")[-_MAX_OUTPUT:]
58 t.exit_code = proc.returncode
59 if t.status != "killed":
60 t.status = "done" if proc.returncode == 0 else "failed"
61 self._procs.pop(tid, None)
62
63 def list(self) -> list[BgTask]:
64 with self._lock:

Callers

nothing calls this directly

Calls 2

communicateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected