This commit is contained in:
vvzvlad 2024-11-23 06:27:45 +03:00
parent 5ec5151db5
commit 43ff2e9ef3

View File

@ -1,7 +1,9 @@
import re import re
from datetime import datetime, timedelta from datetime import datetime, timedelta, timezone
import subprocess import subprocess
import os import os
import time
import random
import sys import sys
import pkg_resources import pkg_resources
@ -138,10 +140,8 @@ if __name__ == "__main__":
grist_row_name = socket.gethostname() grist_row_name = socket.gethostname()
nodes_table = "Nodes" nodes_table = "Nodes"
grist = GRIST(grist_server, grist_doc_id, grist_api_key, logger) grist = GRIST(grist_server, grist_doc_id, grist_api_key, logger)
vms = grist.find_record(name=grist_row_name, table=nodes_table) current_vm = grist.find_record(name=grist_row_name, table=nodes_table)[0]
current_vm = vms[0]
def grist_callback(msg): grist.update(current_vm.id, msg, nodes_table) def grist_callback(msg): grist.update(current_vm.id, msg, nodes_table)
#register_url = grist.find_settings("Nillion checker url", "Settings")
try: try:
result = check_logs() result = check_logs()