Skip to content

Commit

Permalink
executor inside of tokio select
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Sep 25, 2024
1 parent f9a136f commit b883343
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ async fn main() -> anyhow::Result<()> {
let world = WorldContractReader::new(args.world_address, provider.clone());

let (mut executor, sender) = Executor::new(pool.clone()).await?;
tokio::spawn(async move {
executor.run().await.unwrap();
});

let db = Sql::new(pool.clone(), args.world_address, sender.clone()).await?;

let processors = Processors {
Expand Down Expand Up @@ -295,6 +291,7 @@ async fn main() -> anyhow::Result<()> {

tokio::select! {
res = engine.start() => res?,
_ = executor.run() => {},
_ = proxy_server.start(shutdown_tx.subscribe()) => {},
_ = graphql_server => {},
_ = grpc_server => {},
Expand Down

0 comments on commit b883343

Please sign in to comment.