Cargo fmt
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
29f5ad0e84
commit
fc50bb5ee5
|
@ -197,20 +197,15 @@ async fn run() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
PeachConfig::WaitForSbot => {
|
PeachConfig::WaitForSbot => match wait_for_sbot::wait_for_sbot().await {
|
||||||
match wait_for_sbot::wait_for_sbot().await {
|
|
||||||
Ok(sbot_id) => {
|
Ok(sbot_id) => {
|
||||||
println!("connected with sbot and found sbot_id: {:?}", sbot_id)
|
println!("connected with sbot and found sbot_id: {:?}", sbot_id)
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!(
|
error!("peach-config did not successfully connect to sbot: {}", err)
|
||||||
"peach-config did not successfully connect to sbot: {}",
|
|
||||||
err
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,12 @@ pub async fn wait_for_sbot() -> Result<String, PeachConfigError> {
|
||||||
Ok(sbot_id) => {
|
Ok(sbot_id) => {
|
||||||
sbot_is_running = 1;
|
sbot_is_running = 1;
|
||||||
whoami = Some(sbot_id)
|
whoami = Some(sbot_id)
|
||||||
},
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("whoami failed: {:?}", err);
|
eprintln!("whoami failed: {:?}", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("failed to connect to sbot: {:?}", 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);
|
let two_seconds = time::Duration::from_secs(2);
|
||||||
thread::sleep(two_seconds);
|
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(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue