gitdataai/app/email/src/main.rs
2026-05-30 01:38:40 +08:00

23 lines
545 B
Rust

mod context;
use context::AppContext;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let ctx = AppContext::init()?;
tracing::info!("email service starting");
tokio::select! {
result = email::EmailWorker::start(&ctx.config) => {
if let Err(e) = result {
tracing::error!("email worker exited with error: {}", e);
}
}
_ = tokio::signal::ctrl_c() => {
tracing::info!("shutdown signal received, stopping email service");
}
}
Ok(())
}