diff options
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/admin.rs | 4 | ||||
-rw-r--r-- | src/garage/cli/util.rs | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/garage/admin.rs b/src/garage/admin.rs index f307bea1..c98f5142 100644 --- a/src/garage/admin.rs +++ b/src/garage/admin.rs @@ -835,7 +835,9 @@ impl AdminRpcHandler { let workers = if busy { workers .into_iter() - .filter(|(_, w)| w.status == WorkerStatus::Busy) + .filter(|(_, w)| { + matches!(w.status, WorkerStatus::Busy | WorkerStatus::Throttled(_)) + }) .collect() } else { workers diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs index 81361864..ddb353f9 100644 --- a/src/garage/cli/util.rs +++ b/src/garage/cli/util.rs @@ -242,7 +242,7 @@ pub fn print_worker_info(wi: HashMap<usize, WorkerInfo>) { wi.sort_by_key(|(tid, info)| { ( match info.status { - WorkerStatus::Busy => 0, + WorkerStatus::Busy | WorkerStatus::Throttled(_) => 0, WorkerStatus::Idle => 1, WorkerStatus::Done => 2, }, @@ -256,6 +256,20 @@ pub fn print_worker_info(wi: HashMap<usize, WorkerInfo>) { if let Some(i) = &info.info { table.push(format!("\t\t{}", i)); } + if info.consecutive_errors > 0 { + table.push(format!( + "\t\t{} CONSECUTIVE ERRORS ({} total), last: {}", + info.consecutive_errors, + info.errors, + info.last_error.as_deref().unwrap_or("(?)") + )); + } else if info.errors > 0 { + table.push(format!( + "\t\t{} errors, last: {}", + info.errors, + info.last_error.as_deref().unwrap_or("(?)") + )); + } } format_table(table); } |