Skip to content

Commit

Permalink
try to fix sql connection
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed Oct 25, 2023
1 parent 9224eb6 commit 75e2d2f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/erooster_core/src/backend/database/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ impl Database<sqlx::Postgres> for Postgres {
.connect(&config.database.postgres_url)
.await?;
sqlx::migrate!().run(&pool).await?;
let new_self = Self { pool };
INSTANCE.get_or_init(|| new_self.clone());
Ok(new_self)
let new_self = INSTANCE.get_or_init(|| Self { pool });
Ok(new_self.clone())
}
}

Expand Down

0 comments on commit 75e2d2f

Please sign in to comment.