increase hetzner polling time

This commit is contained in:
mbecker20
2024-05-25 15:49:10 -07:00
parent 0758e6ff81
commit a70c0a2697
+8 -3
View File
@@ -47,8 +47,8 @@ pub struct HetznerServerMinimal {
pub ip: String,
}
const POLL_RATE_SECS: u64 = 2;
const MAX_POLL_TRIES: usize = 30;
const POLL_RATE_SECS: u64 = 3;
const MAX_POLL_TRIES: usize = 100;
#[instrument]
pub async fn launch_hetzner_server(
@@ -140,7 +140,12 @@ pub async fn launch_hetzner_server(
};
if matches!(res.server.status, HetznerServerStatus::Running) {
let ip = if use_public_ip {
res.server.public_net.ipv4.context("instance ")?.ip
res
.server
.public_net
.ipv4
.context("instance does not have public ipv4 attached")?
.ip
} else {
res
.server