Compare commits

...

3 Commits

Author SHA1 Message Date
596df36b8e build 2025-07-15 12:51:51 +02:00
1748a4d36f build 2025-07-15 12:50:27 +02:00
e24304abe5 build 2025-07-15 12:40:33 +02:00

View File

@@ -16,11 +16,11 @@ import requests
import fnmatch import fnmatch
import yaml import yaml
import paramiko import paramiko
import numpy as np #import numpy as np
file_path = os.path.realpath(__file__) file_path = os.path.realpath(__file__)
dir_path = os.path.dirname(file_path) dir_path = os.path.dirname(file_path)
VERSION="1.0.7" VERSION="1.0.8"
# print(file_path) # print(file_path)
# print(dir_path) # print(dir_path)
os.chdir(dir_path) os.chdir(dir_path)
@@ -238,9 +238,11 @@ if _RESTORE:
topic = "sectorq/amd/restore" topic = "sectorq/amd/restore"
step = 100 / len(_APP) step = 100 / len(_APP)
for app in _APP: for app in _APP:
msg = {"mode":_MODE, "status":"restore","bak_name":"Restore","host":host,"cur_job":app,"start_time":STARTTIME,"end_time":"","progress":str(round(np.ceil(PROGRESS))) + "%","finished":1,"used_space":1} #msg = {"mode":_MODE, "status":"restore","bak_name":"Restore","host":host,"cur_job":app,"start_time":STARTTIME,"end_time":"","progress":str(round(np.ceil(PROGRESS))) + "%","finished":1,"used_space":1}
msg = {"mode":_MODE, "status":"restore","bak_name":"Restore","host":host,"cur_job":app,"start_time":STARTTIME,"end_time":"","progress":"0" + "%","finished":1,"used_space":1}
logging.info(msg) logging.info(msg)
send_mqtt_message(msg) send_mqtt_message(msg)
PROGRESS = PROGRESS + step PROGRESS = PROGRESS + step
now = datetime.datetime.now() now = datetime.datetime.now()