Extract git commands to own module

This commit is contained in:
Joscha 2023-08-17 15:01:00 +02:00
parent f12da915a9
commit 546de29706
5 changed files with 85 additions and 39 deletions

View file

@ -5,7 +5,6 @@ use time::OffsetDateTime;
use crate::somehow;
async fn inner(db: &SqlitePool) -> somehow::Result<()> {
debug!("Updating queue");
let mut tx = db.begin().await?;
let conn = tx.acquire().await?;
@ -40,6 +39,7 @@ async fn inner(db: &SqlitePool) -> somehow::Result<()> {
}
pub(super) async fn update(db: &SqlitePool) {
debug!("Updating queue");
if let Err(e) = inner(db).await {
warn!("Error updating queue:\n{e:?}");
}