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