Define readiness probe to know when the new server can accept traffic

This commit is contained in:
Antonio Scandurra 2022-12-14 08:54:46 +01:00
parent 59c9a57570
commit 897506c797
4 changed files with 14 additions and 8 deletions

View file

@ -58,7 +58,7 @@ async fn main() -> Result<()> {
.expect("failed to bind TCP listener");
let rpc_server = collab::rpc::Server::new(state.clone(), Executor::Production);
rpc_server.start();
rpc_server.start().await?;
let app = collab::api::routes(rpc_server.clone(), state.clone())
.merge(collab::rpc::routes(rpc_server.clone()))