Files
janssen/mailstore/_status_check.py
T
2026-06-13 21:45:28 +02:00

23 lines
686 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Jednorazovy status check ingestu na serveru."""
import sys
import paramiko
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("192.168.1.76", username="root", password="7309208104", timeout=10)
cmd = (
"date; "
"echo ---PROC---; "
"docker exec python-runner ps aux 2>/dev/null | grep mailstore_ingest | grep -v grep; "
"echo ---FOLDERS_DONE---; "
"grep -c 'k dobrani=' /mnt/user/Scripts/MailStore/ingest_full.log; "
"echo ---TAIL---; "
"tail -3 /mnt/user/Scripts/MailStore/ingest_full.log"
)
i, o, e = c.exec_command(cmd)
sys.stdout.buffer.write(o.read())
c.close()