Bump indicatif from 0.15.0 to 0.16.2 (#17628)
* Bump indicatif from 0.15.0 to 0.16.2 Bumps [indicatif](https://github.com/mitsuhiko/indicatif) from 0.15.0 to 0.16.2. - [Release notes](https://github.com/mitsuhiko/indicatif/releases) - [Commits](https://github.com/mitsuhiko/indicatif/compare/0.15.0...0.16.2) Signed-off-by: dependabot[bot] <support@github.com> * [auto-commit] Update all Cargo lock files * Fix message types Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@ -18,7 +18,7 @@ clap = "2.33.1"
|
||||
console = "0.14.1"
|
||||
core_affinity = "0.5.10"
|
||||
fd-lock = "2.0.0"
|
||||
indicatif = "0.15.0"
|
||||
indicatif = "0.16.2"
|
||||
jsonrpc-core = "17.0.0"
|
||||
jsonrpc-core-client = { version = "17.0.0", features = ["ipc", "ws"] }
|
||||
jsonrpc-derive = "17.0.0"
|
||||
|
@ -143,7 +143,7 @@ impl Dashboard {
|
||||
)
|
||||
};
|
||||
|
||||
progress_bar.set_message(&format!(
|
||||
progress_bar.set_message(format!(
|
||||
"{}{}{}| \
|
||||
Processed Slot: {} | Confirmed Slot: {} | Finalized Slot: {} | \
|
||||
Snapshot Slot: {} | \
|
||||
@ -172,7 +172,7 @@ impl Dashboard {
|
||||
}
|
||||
Err(err) => {
|
||||
progress_bar
|
||||
.abandon_with_message(&format!("RPC connection failure: {}", err));
|
||||
.abandon_with_message(format!("RPC connection failure: {}", err));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -197,7 +197,7 @@ async fn wait_for_validator_startup(
|
||||
match admin_rpc_service::connect(&ledger_path).await {
|
||||
Ok(new_admin_client) => admin_client = Some(new_admin_client),
|
||||
Err(err) => {
|
||||
progress_bar.set_message(&format!("Unable to connect to validator: {}", err));
|
||||
progress_bar.set_message(format!("Unable to connect to validator: {}", err));
|
||||
thread::sleep(refresh_interval);
|
||||
continue;
|
||||
}
|
||||
@ -216,22 +216,21 @@ async fn wait_for_validator_startup(
|
||||
}
|
||||
.await
|
||||
{
|
||||
Ok((None, _)) => progress_bar.set_message(&"RPC service not available"),
|
||||
Ok((None, _)) => progress_bar.set_message("RPC service not available"),
|
||||
Ok((Some(rpc_addr), start_time)) => return Some((rpc_addr, start_time)),
|
||||
Err(err) => {
|
||||
progress_bar
|
||||
.set_message(&format!("Failed to get validator info: {}", err));
|
||||
.set_message(format!("Failed to get validator info: {}", err));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
progress_bar
|
||||
.set_message(&format!("Validator startup: {:?}...", start_progress));
|
||||
progress_bar.set_message(format!("Validator startup: {:?}...", start_progress));
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
admin_client = None;
|
||||
progress_bar
|
||||
.set_message(&format!("Failed to get validator start progress: {}", err));
|
||||
.set_message(format!("Failed to get validator start progress: {}", err));
|
||||
}
|
||||
}
|
||||
thread::sleep(refresh_interval);
|
||||
|
@ -5,7 +5,7 @@ use {
|
||||
console::style,
|
||||
indicatif::{ProgressDrawTarget, ProgressStyle},
|
||||
log::*,
|
||||
std::{env, process::exit, thread::JoinHandle},
|
||||
std::{borrow::Cow, env, fmt::Display, process::exit, thread::JoinHandle},
|
||||
};
|
||||
|
||||
pub mod admin_rpc_service;
|
||||
@ -117,7 +117,7 @@ pub struct ProgressBar {
|
||||
}
|
||||
|
||||
impl ProgressBar {
|
||||
pub fn set_message(&self, msg: &str) {
|
||||
pub fn set_message<T: Into<Cow<'static, str>> + Display>(&self, msg: T) {
|
||||
if self.is_term {
|
||||
self.progress_bar.set_message(msg);
|
||||
} else {
|
||||
@ -125,7 +125,7 @@ impl ProgressBar {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn abandon_with_message(&self, msg: &str) {
|
||||
pub fn abandon_with_message<T: Into<Cow<'static, str>> + Display>(&self, msg: T) {
|
||||
if self.is_term {
|
||||
self.progress_bar.abandon_with_message(msg);
|
||||
} else {
|
||||
|
@ -160,7 +160,7 @@ fn wait_for_restart_window(
|
||||
None => true,
|
||||
Some(current_epoch) => current_epoch != epoch_info.epoch,
|
||||
} {
|
||||
progress_bar.set_message(&format!(
|
||||
progress_bar.set_message(format!(
|
||||
"Fetching leader schedule for epoch {}...",
|
||||
epoch_info.epoch
|
||||
));
|
||||
@ -285,7 +285,7 @@ fn wait_for_restart_window(
|
||||
}
|
||||
};
|
||||
|
||||
progress_bar.set_message(&format!(
|
||||
progress_bar.set_message(format!(
|
||||
"{} | Processed Slot: {} | Snapshot Slot: {} | {:.2}% delinquent stake | {}",
|
||||
{
|
||||
let elapsed =
|
||||
|
Reference in New Issue
Block a user