Cargo fmt
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
notplants 2022-07-12 12:29:47 +02:00
parent 29f5ad0e84
commit fc50bb5ee5
2 changed files with 14 additions and 17 deletions

View File

@ -197,20 +197,15 @@ async fn run() {
)
}
}
},
PeachConfig::WaitForSbot => {
match wait_for_sbot::wait_for_sbot().await {
Ok(sbot_id) => {
println!("connected with sbot and found sbot_id: {:?}", sbot_id)
}
Err(err) => {
error!(
"peach-config did not successfully connect to sbot: {}",
err
)
}
}
}
PeachConfig::WaitForSbot => match wait_for_sbot::wait_for_sbot().await {
Ok(sbot_id) => {
println!("connected with sbot and found sbot_id: {:?}", sbot_id)
}
Err(err) => {
error!("peach-config did not successfully connect to sbot: {}", err)
}
},
}
}
}

View File

@ -21,12 +21,12 @@ pub async fn wait_for_sbot() -> Result<String, PeachConfigError> {
Ok(sbot_id) => {
sbot_is_running = 1;
whoami = Some(sbot_id)
},
}
Err(err) => {
eprintln!("whoami failed: {:?}", err);
}
}
},
}
Err(err) => {
eprintln!("failed to connect to sbot: {:?}", err);
}
@ -37,6 +37,8 @@ pub async fn wait_for_sbot() -> Result<String, PeachConfigError> {
let two_seconds = time::Duration::from_secs(2);
thread::sleep(two_seconds);
}
};
whoami.ok_or(PeachConfigError::WaitForSbotError{ message: "Failed to find sbot_id after 10 attempts".to_string()})
}
whoami.ok_or(PeachConfigError::WaitForSbotError {
message: "Failed to find sbot_id after 10 attempts".to_string(),
})
}