Enhance logging and timing in CLI and session operations
- Updated the `_print_checks` function to replace console prints with logging functions for better traceability. - Introduced timing functionality in the `doctor`, `dry_run`, and `up` functions to log the duration of preflight checks. - Modified the `wait_ssh` function to accept a logging callback, improving SSH wait feedback. - Enhanced the `mark` method in `PhaseTimes` to log phase durations, aiding in performance analysis. - Updated various remote scripts to ensure error messages are printed to stderr for better error handling.
This commit is contained in:
@@ -9,7 +9,7 @@ MARKER_DATA="${DATA_ROOT}/.gpu-rent-ready"
|
||||
MARKER_BOOT="${SWARM_ROOT}/.gpu-rent-bootstrapped"
|
||||
SWARM_REPO="https://github.com/mcmonkeyprojects/SwarmUI.git"
|
||||
|
||||
log() { echo "[gpu-rent] $*"; }
|
||||
log() { echo "[gpu-rent] $*" >&2; }
|
||||
|
||||
if [[ "$(id -u)" -ne 0 ]]; then
|
||||
echo "нужен root (sudo -n bash $0)" >&2
|
||||
|
||||
Reference in New Issue
Block a user