Skip to content

Commit

Permalink
fix(cat-gateway): box large futures lint
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Dec 2, 2024
1 parent 9216944 commit c0056ff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions catalyst-gateway/bin/src/db/index/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ impl CassandraSession {
pub(crate) fn init() {
let (persistent, volatile) = Settings::cassandra_db_cfg();

let _join_handle = tokio::task::spawn(async move { retry_init(persistent, true).await });
let _join_handle = tokio::task::spawn(async move { retry_init(volatile, false).await });
let _join_handle =
tokio::task::spawn(async move { Box::pin(retry_init(persistent, true)).await });
let _join_handle =
tokio::task::spawn(async move { Box::pin(retry_init(volatile, false)).await });
}

/// Check to see if the Cassandra Indexing DB is ready for use
Expand Down Expand Up @@ -323,7 +325,8 @@ async fn retry_init(cfg: cassandra_db::EnvVars, persistent: bool) {
},
};

let purge_queries = match purge::PreparedQueries::new(session.clone(), &cfg).await {
let purge_queries = match Box::pin(purge::PreparedQueries::new(session.clone(), &cfg)).await
{
Ok(queries) => Arc::new(queries),
Err(error) => {
error!(
Expand Down

0 comments on commit c0056ff

Please sign in to comment.