douyinWEB/scripts/_inspect_tiktok_publish_fail.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

22 lines
859 B
Python

# -*- coding: utf-8 -*-
import sys
import paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
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)
cmds = [
"journalctl -u douyinweb-api --since '30 min ago' --no-pager 2>&1 | grep -E 'Publish|project/post|status_code|status_msg|Invalid|posting too|Published|Trying|error occured' | tail -80",
"journalctl -u douyinweb-api --since '15 min ago' --no-pager 2>&1 | grep -vE 'GET /api/' | tail -60",
]
for cmd in cmds:
print("\n====", cmd[:90])
_s, out, err = c.exec_command(cmd, timeout=25)
print(out.read().decode("utf-8", "replace")[-8000:])
e = err.read().decode("utf-8", "replace")
if e:
print("ERR:", e[:400])
c.close()