MCPcopy Create free account
hub / github.com/HelpFreedom/youthub / _spawn_telemetry

Function _spawn_telemetry

pr_fetch.py:545–563  ·  view source on GitHub ↗
(vid: str, pr_blob: str, strategy_id: str)

Source from the content-addressed store, hash-verified

543
544
545def _spawn_telemetry(vid: str, pr_blob: str, strategy_id: str) -> None:
546 rec_ids = []
547 try:
548 rec_ids = _extract_recommended_video_ids(pr_blob)[:8]
549 except Exception:
550 pass
551 ids = [vid] + rec_ids
552 args = [sys.executable, str(Path(__file__).resolve()),
553 "--telemetry", strategy_id, ",".join(ids)]
554 try:
555 subprocess.Popen(
556 args,
557 stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
558 stdin=subprocess.DEVNULL,
559 start_new_session=True,
560 env=os.environ.copy(),
561 )
562 except Exception as e:
563 _log(f"failed to spawn telemetry: {e}")
564
565
566def _extract_recommended_video_ids(pr_blob: str) -> list[str]:

Callers 1

mainFunction · 0.85

Calls 2

_logFunction · 0.70

Tested by

no test coverage detected