douyinWEB/scripts/_verify_assign_autofill.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
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>
2026-09-04 22:42:40 -05:00

27 lines
843 B
Python

# -*- coding: utf-8 -*-
from __future__ import annotations
import sys
import paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
REMOTE = r"""
from app import yt_assign_db
r = yt_assign_db.ensure_default_assign_data()
print("ensure", r)
for g in yt_assign_db.list_groups(include_urls=True):
print(g.get("name"), "pool", len(g.get("pool") or []), "slots", len(g.get("slots") or []))
"""
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
_, o, e = c.exec_command(
f"cd /opt/douyinWEB/backend && .venv/bin/python - <<'PY'\n{REMOTE}\nPY",
timeout=60,
)
print(o.read().decode("utf-8", "replace"))
if e.read().decode().strip():
print("ERR", e.read().decode()[:500])
c.close()