Add CustomAttribut2
parent
f2d02216a5
commit
47c55ccfdc
|
|
@ -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)
|
||||
|
||||
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)
|
||||
Binary file not shown.
Loading…
Reference in New Issue