Don't block tokio when collecting new commits

This commit is contained in:
Joscha 2023-08-06 15:00:11 +02:00
parent 5709a69694
commit 6fcd073738
3 changed files with 51 additions and 25 deletions

View file

@ -10,10 +10,8 @@ use tracing::{debug_span, error, Instrument};
use crate::state::AppState;
async fn recurring_task(state: &AppState) {
let repo = state.repo.to_thread_local();
async {
if let Err(e) = repo::update(&state.db, &repo).await {
if let Err(e) = repo::update(&state.db, state.repo.clone()).await {
error!("Error updating repo:\n{e:?}");
};
}