diff --git a/Controller/exchange_export.py b/Controller/exchange_export.py index 5d94764..473b217 100644 --- a/Controller/exchange_export.py +++ b/Controller/exchange_export.py @@ -77,20 +77,20 @@ service_time = f"23:{str(random.randint(1, 59)).zfill(2)}" ## ADD Random Time ip = get_local_ip() exchange(ip,"tnp-Invest-GmbH") -# -# while True: -# current_time = datetime.now().strftime("%H:%M") -# try: -# with open ("log.txt","a") as datei: -# datei.writelines(request_get("gettime",{}).text + "\n") -# except Exception as e: -# with open ("log.txt","a") as datei: -# datei.writelines(f"{current_time}No Connection to Server!" + "\n") -# if current_time == service_time: -# ip = get_local_ip() -# database = request_post("info/getdatabase",{"ip":ip}).text.replace('"',"") -# exchange(ip,database) -# with open ("log.txt","a") as datei: -# datei.writelines(f"{current_time} - Sleep for {22*3600}" + "\n") -# time.sleep(22*3600) -# time.sleep(60) \ No newline at end of file + +while True: + current_time = datetime.now().strftime("%H:%M") + try: + with open ("log.txt","a") as datei: + datei.writelines(request_get("gettime",{}).text + "\n") + except Exception as e: + with open ("log.txt","a") as datei: + datei.writelines(f"{current_time}No Connection to Server!" + "\n") + if current_time == service_time: + ip = get_local_ip() + database = request_post("info/getdatabase",{"ip":ip}).text.replace('"',"") + exchange(ip,database) + with open ("log.txt","a") as datei: + datei.writelines(f"{current_time} - Sleep for {22*3600}" + "\n") + time.sleep(22*3600) + time.sleep(60) \ No newline at end of file diff --git a/dist/REPORTS-EX.exe b/dist/REPORTS-EX.exe index e43f751..a9efc70 100644 Binary files a/dist/REPORTS-EX.exe and b/dist/REPORTS-EX.exe differ