MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / _force_stop

Function _force_stop

main.py:148–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146 from tools.app_runner import run
147
148 def _force_stop() -> None:
149 c = crawler
150 if not c:
151 return
152 cdp_manager = getattr(c, "cdp_manager", None)
153 launcher = getattr(cdp_manager, "launcher", None)
154 if not launcher:
155 return
156 try:
157 launcher.cleanup()
158 except Exception:
159 pass
160
161 run(main, async_cleanup, cleanup_timeout_seconds=15.0, on_first_interrupt=_force_stop)

Callers

nothing calls this directly

Calls 1

cleanupMethod · 0.45

Tested by

no test coverage detected