mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 01:43:34 -04:00
refactor: apply consistent code formatting across notification, server, database, and pipeline modules
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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)))?;
|
||||
|
||||
Reference in New Issue
Block a user