refactor: apply consistent code formatting across notification, server, database, and pipeline modules

This commit is contained in:
2026-04-04 08:08:42 -04:00
parent ca18be7272
commit cd9db604ec
4 changed files with 14 additions and 7 deletions

View File

@@ -621,7 +621,8 @@ impl Db {
let pool = sqlx::sqlite::SqlitePoolOptions::new()
.max_connections(1)
.connect_with(options).await?;
.connect_with(options)
.await?;
info!(
target: "startup",
"Database connection opened in {} ms",

View File

@@ -1275,13 +1275,16 @@ impl Pipeline {
Ok(_) => {
tracing::error!(
"Job {}: Output file {:?} is empty after promotion — source preserved to prevent data loss",
job_id, context.output_path
job_id,
context.output_path
);
}
Err(e) => {
tracing::error!(
"Job {}: Cannot verify output {:?} after promotion ({}). Source preserved to prevent data loss",
job_id, context.output_path, e
job_id,
context.output_path,
e
);
}
}

View File

@@ -114,7 +114,12 @@ impl NotificationManager {
.ok_or("notification endpoint host is missing")?;
let port = url.port_or_known_default().ok_or("invalid port")?;
let allow_local = self.config.read().await.notifications.allow_local_notifications;
let allow_local = self
.config
.read()
.await
.notifications
.allow_local_notifications;
if !allow_local && host.eq_ignore_ascii_case("localhost") {
return Err("localhost is not allowed as a notification endpoint".into());

View File

@@ -268,9 +268,7 @@ pub async fn run_server(args: RunServerArgs) -> Result<()> {
}
// Forceful immediate shutdown of active jobs
shutdown_agent
.graceful_shutdown()
.await;
shutdown_agent.graceful_shutdown().await;
})
.await
.map_err(|e| AlchemistError::Unknown(format!("Server error: {}", e)))?;