chore: 程序开始时打印欢迎信息,调整日志和构建流 (#285)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-02-21 21:04:39 +08:00
committed by GitHub
parent f8b93d2c76
commit 2b3e6f9547
7 changed files with 22 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ pub async fn http_server(database_connection: Arc<DatabaseConnection>) -> Result
let listener = tokio::net::TcpListener::bind(&CONFIG.bind_address)
.await
.context("bind address failed")?;
info!("开始监听 http 服务: http://{}", CONFIG.bind_address);
info!("开始运行管理页: http://{}", CONFIG.bind_address);
Ok(axum::serve(listener, ServiceExt::<Request>::into_make_service(app)).await?)
}

View File

@@ -13,6 +13,7 @@ pub async fn video_downloader(connection: Arc<DatabaseConnection>) {
let bili_client = BiliClient::new();
let video_sources = CONFIG.as_video_sources();
loop {
info!("开始执行本轮视频下载任务..");
'inner: {
match bili_client.wbi_img().await.map(|wbi_img| wbi_img.into()) {
Ok(Some(mixin_key)) => bilibili::set_global_mixin_key(mixin_key),