Skip to content

Commit

Permalink
refactor(torii): different tasks for torii services
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Oct 17, 2024
1 parent 70ecca7 commit 708e352
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,17 @@ async fn main() -> anyhow::Result<()> {
.await?;
}

tokio::spawn(async move {
proxy_server.start(shutdown_tx.subscribe()).await.unwrap();
});
tokio::spawn(graphql_server);
tokio::spawn(grpc_server);
tokio::spawn(async move {
libp2p_relay_server.run().await;
});

tokio::select! {
res = engine.start() => res?,
_ = proxy_server.start(shutdown_tx.subscribe()) => {},
_ = graphql_server => {},
_ = grpc_server => {},
_ = libp2p_relay_server.run() => {},
_ = dojo_utils::signal::wait_signals() => {},
};

Expand Down

0 comments on commit 708e352

Please sign in to comment.