Enhance logging in CLI preflight checks

- Added logging statements to the `doctor`, `dry_run`, and `up` functions to indicate the start of preflight checks, improving user feedback during execution.
- Ensured consistent logging messages across different functions to enhance traceability and debugging capabilities.
This commit is contained in:
Leonid Pershin
2026-08-21 07:52:52 +03:00
parent 242f5b7c89
commit 7756d0d4df
+3
View File
@@ -130,6 +130,7 @@ def version() -> None:
def doctor() -> None: def doctor() -> None:
"""Preflight без create: Keystone, квота, flavor, диск, Civitai, манифесты.""" """Preflight без create: Keystone, квота, flavor, диск, Civitai, манифесты."""
try: try:
log("запускаю проверку…")
checks = run_doctor() checks = run_doctor()
except GpuRentError as exc: except GpuRentError as exc:
_die(exc) _die(exc)
@@ -141,6 +142,7 @@ def doctor() -> None:
def dry_run() -> None: def dry_run() -> None:
"""План без mutating-вызовов.""" """План без mutating-вызовов."""
try: try:
log("запускаю проверку…")
checks = run_doctor() checks = run_doctor()
_print_checks(checks) _print_checks(checks)
console.print("\n[bold]План[/bold]") console.print("\n[bold]План[/bold]")
@@ -458,6 +460,7 @@ def up(
from gpu_rent.prompts import MenuItem, prompt_menu from gpu_rent.prompts import MenuItem, prompt_menu
from gpu_rent.varsfile import upsert_vars from gpu_rent.varsfile import upsert_vars
log("запускаю проверку…")
checks = run_doctor() checks = run_doctor()
code = _print_checks(checks, quiet=not verbose) code = _print_checks(checks, quiet=not verbose)
if code != 0: if code != 0: