最初版本
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import paramiko
|
||||
|
||||
pw = os.environ["DEPLOY_PASSWORD"]
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect("20.191.152.26", username="wakka", password=pw, timeout=30)
|
||||
cmd = r"""sudo docker exec guest-chat-postgres-1 psql -U postgres -d chatwoot_production -c "
|
||||
SELECT id, pre_chat_form_enabled, feature_flags FROM channel_web_widgets;
|
||||
SELECT m.id, m.conversation_id, m.message_type, left(m.content,60), m.created_at FROM messages ORDER BY id DESC LIMIT 5;
|
||||
"
|
||||
"""
|
||||
_, o, _ = c.exec_command(cmd, timeout=30)
|
||||
print(o.read().decode(errors='replace'))
|
||||
c.close()
|
||||
Reference in New Issue
Block a user