fix: articles.py get_article 链式 await coroutine 报错(.first())
This commit is contained in:
12
scripts/_logs.py
Normal file
12
scripts/_logs.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import os, paramiko
|
||||
PW = os.environ["REMOTE_PASS"]
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect("207.57.129.228", port=19717, username="root", password=PW, timeout=15, allow_agent=False, look_for_keys=False)
|
||||
|
||||
# 用 invoke_shell 拉日志
|
||||
import time
|
||||
si, so, se = c.exec_command("docker logs --tail=80 news-aggregator-api-1 2>&1", timeout=20)
|
||||
out = so.read().decode("utf-8", "replace")
|
||||
print(out)
|
||||
c.close()
|
||||
Reference in New Issue
Block a user