diff --git a/omv_backup_v4.py b/omv_backup_v4.py index 0b5ea67..99b793d 100755 --- a/omv_backup_v4.py +++ b/omv_backup_v4.py @@ -16,6 +16,7 @@ import requests import fnmatch import yaml import paramiko +import numpy as np file_path = os.path.realpath(__file__) dir_path = os.path.dirname(file_path) VERSION="1.0.1" @@ -243,7 +244,7 @@ if _RESTORE: topic = "sectorq/amd/backups" step = 100 / len(_APP) for app in _APP: - msg = {"mode":_MODE, "status":"restore","bak_name":"s","host":host,"cur_job":app,"start_time":STARTTIME,"end_time":"","progress":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":np.ceil(PROGRESS),"finished":1,"used_space":1} logging.info(msg) send_mqtt_message(msg)