MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _read_pid_file

Method _read_pid_file

src/services/browser_captcha.py:879–887  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

877 return f"--flow2api-browser-slot={self.token_id}"
878
879 def _read_pid_file(self) -> Optional[int]:
880 try:
881 if not os.path.exists(self._pid_file):
882 return None
883 with open(self._pid_file, 'r', encoding='utf-8') as handle:
884 raw = (handle.read() or '').strip()
885 return int(raw or '0') or None
886 except Exception:
887 return None
888
889 def _write_pid_file(self, pid: Optional[int]):
890 self._shared_browser_pid = pid

Callers 3

_close_browserMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected