Move server URL to config

This commit is contained in:
Peter J. Holzer 2022-09-04 12:47:20 +02:00
parent d34e57a9ff
commit 67bb915e49
1 changed files with 1 additions and 1 deletions

View File

@ -11,13 +11,13 @@ import requests
hostname = socket.gethostbyaddr(socket.gethostname())[0] hostname = socket.gethostbyaddr(socket.gethostname())[0]
baseurl = "http://127.0.0.1:5000/"
def report_loadavg(): def report_loadavg():
now = time.time() now = time.time()
load = os.getloadavg() load = os.getloadavg()
with open("config.json") as fh: with open("config.json") as fh:
client_config = json.load(fh) client_config = json.load(fh)
baseurl = client_config["server"]
while True: while True:
report = [] report = []