Skip to content

Commit

Permalink
chore: logs
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyKomodo committed May 3, 2024
1 parent f2b56f0 commit d9e26a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion image_processor/migrations/0001_initial.down.sql

This file was deleted.

10 changes: 0 additions & 10 deletions image_processor/migrations/0001_initial.up.sql

This file was deleted.

4 changes: 4 additions & 0 deletions image_processor/src/migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ async fn run_migration<S: ImageProcessorGlobal>(
global: &Arc<S>,
migration: &'static dyn Migration<S>,
) -> anyhow::Result<()> {
tracing::info!("Applying migration");

let mut client = global.db().get().await.context("Failed to get database connection")?;
let tx = client.transaction().await.context("Failed to start transaction")?;

Expand All @@ -79,6 +81,8 @@ async fn run_migration<S: ImageProcessorGlobal>(

tx.commit().await.context("Failed to commit transaction")?;

tracing::info!("Migration applied");

Ok(())
}

Expand Down

0 comments on commit d9e26a5

Please sign in to comment.