Skip to content

Commit

Permalink
Minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Burmak committed Nov 13, 2023
1 parent 133355e commit 2ee722d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch_tools/monrun_checks/ch_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _check_backup_age(
checking_backup = backup
break

if len(checking_backup) == 0:
if not checking_backup:
return Result(OK)

backup_age = _get_backup_age(checking_backup)
Expand Down Expand Up @@ -197,7 +197,7 @@ def _check_restored_data() -> Result:
)
if failed != 0:
failed_percent = int((failed / (failed + restored)) * 100)
status = 1 if failed_percent < FAILED_PARTS_THRESHOLD else 2
status = WARNING if failed_percent < FAILED_PARTS_THRESHOLD else CRIT
return Result(
status, f"Some parts restore failed: {failed}({failed_percent}%)"
)
Expand Down

0 comments on commit 2ee722d

Please sign in to comment.