perf: block in place for determining nearby

This commit is contained in:
Anna 2024-07-22 13:37:06 -04:00
parent 671931c23b
commit 5f9787884b
Signed by: anna
GPG Key ID: D0943384CD9F87D1

View File

@ -125,7 +125,7 @@ async fn logic(state: Arc<State>, id: i64, location: u32, query: GetLocationQuer
.map_err(warp::reject::custom)?
};
filter_messages(&mut messages, id, state.config.vote_threshold_hide);
tokio::task::block_in_place(|| filter_messages(&mut messages, id, state.config.vote_threshold_hide));
Ok(warp::reply::json(&messages))
}