Revert "Add sql transactions"

This caused the error "locked database".
This reverts commit 9823511b62.
This commit is contained in:
Tobias Reisinger 2024-05-02 19:33:25 +02:00
parent 9823511b62
commit 02c613e0fd
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 138 additions and 171 deletions

View file

@ -28,11 +28,11 @@ async fn main() -> Result<(), std::io::Error> {
let pool = emgauwa_common::db::init(&settings.database).await?;
let mut tx = pool.begin().await.map_err(EmgauwaError::from)?;
DbController::all_inactive(&mut tx)
let mut conn = pool.acquire().await.map_err(EmgauwaError::from)?;
DbController::all_inactive(&mut conn)
.await
.map_err(EmgauwaError::from)?;
tx.commit().await.map_err(EmgauwaError::from)?;
conn.close().await.map_err(EmgauwaError::from)?;
let app_state_arbiter = Arbiter::with_tokio_rt(|| {
tokio::runtime::Builder::new_multi_thread()