Skip to content

Commit

Permalink
make agent continue working without access to platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Smehnov committed May 15, 2024
1 parent e1d822e commit 0e68934
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,14 @@ async fn main_normal(
async move {}.boxed()
})
}
let _socket = socket.connect().await.expect("Connection failed");
let _socket = socket.connect().await?;

sleep(Duration::from_secs(10));
loop {
info!("me request");
let _res = _socket
.emit("me", json!({}))
.await
.expect("Server unreachable");
.await?;
sleep(Duration::from_secs(60));
}
}
Expand Down Expand Up @@ -188,11 +187,11 @@ async fn main() -> Result<(), Box<dyn Error>> {
//}

let _ = main_normal(main_args, main_config, main_robots).await;
Ok(())


//loop {
// tokio::time::sleep(Duration::from_secs(1));
//}
loop {
tokio::time::sleep(Duration::from_secs(1));
}
}

#[cfg(test)]
Expand Down

0 comments on commit 0e68934

Please sign in to comment.