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

Method _write_pid_file

src/services/browser_captcha.py:889–898  ·  view source on GitHub ↗
(self, pid: Optional[int])

Source from the content-addressed store, hash-verified

887 return None
888
889 def _write_pid_file(self, pid: Optional[int]):
890 self._shared_browser_pid = pid
891 try:
892 if pid:
893 with open(self._pid_file, 'w', encoding='utf-8') as handle:
894 handle.write(str(pid))
895 elif os.path.exists(self._pid_file):
896 os.remove(self._pid_file)
897 except Exception as e:
898 debug_logger.log_warning(f"[BrowserCaptcha] Token-{self.token_id} failed to write PID file: {e}")
899
900 def _is_pid_running(self, pid: Optional[int]) -> bool:
901 if not pid:

Callers 3

_create_browserMethod · 0.95
_close_browserMethod · 0.95

Calls 1

log_warningMethod · 0.80

Tested by

no test coverage detected