修正备份失败健康状态

This commit is contained in:
yml2213
2026-08-17 00:08:09 +08:00
parent a0bf47f2ed
commit 79eebdc8e5
+3 -1
View File
@@ -61,7 +61,9 @@ write_status() {
# shellcheck disable=SC1090
source "${status_dir}/last-job.env"
fi
if [[ -n "${local_complete}" && -n "${remote_complete}" && -n "${binlog_file}" ]]; then
if [[ "${job_status}" == 'failed' ]]; then
health='warning'
elif [[ -n "${local_complete}" && -n "${remote_complete}" && -n "${binlog_file}" ]]; then
health='healthy'
else
health='warning'