Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
548 B
Python
17 lines
548 B
Python
# -*- coding: utf-8 -*-
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
script = Path("/opt/douyinWEB/backend/neko/cdp_studio_scrape.py").read_text(encoding="utf-8")
|
|
for idx in range(1, 8):
|
|
name = f"douyinweb-neko-{idx}"
|
|
p = subprocess.run(
|
|
["docker", "exec", "-i", name, "python3", "-"],
|
|
input=script,
|
|
capture_output=True,
|
|
text=True,
|
|
timeout=35,
|
|
)
|
|
line = (p.stdout or p.stderr or "").strip().splitlines()[-1] if (p.stdout or p.stderr) else ""
|
|
print(f"{name} rc={p.returncode} {line[:260]}")
|