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 Nov 21, 2024
1 parent c0a2b70 commit 86b837d
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 86b837d

Please sign in to comment.