1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-12 02:22:41 +03:00

Grab a database lock when syncing the config

Fixes #1475
This commit is contained in:
Quentin Gliech
2023-08-25 15:39:31 +02:00
parent 7ff9be99db
commit 9289922dfb
7 changed files with 162 additions and 76 deletions

View File

@@ -31,7 +31,7 @@ use tokio::signal::unix::SignalKind;
use tracing::{info, info_span, warn, Instrument};
use crate::util::{
database_from_config, mailer_from_config, password_manager_from_config,
database_pool_from_config, mailer_from_config, password_manager_from_config,
policy_factory_from_config, register_sighup, templates_from_config,
};
@@ -59,7 +59,7 @@ impl Options {
// Connect to the database
info!("Connecting to the database");
let pool = database_from_config(&config.database).await?;
let pool = database_pool_from_config(&config.database).await?;
if self.migrate {
info!("Running pending migrations");