update code level

This commit is contained in:
lychang
2026-07-21 02:17:46 +08:00
parent f572c7370d
commit 005688b58f
4 changed files with 54 additions and 22 deletions

View File

@@ -122,8 +122,16 @@ async fn main() -> std::io::Result<()> {
Err(e) => error!("[启动] 导入失败: {}", e),
}
// ② 查找新相册 / 半成品
info!("[启动] ② 查找新相册...");
// ② 清理:删除空相册 + 去重
info!("[启动] ② 清理空相册和重复相册...");
let empty = engine::pipeline::phase_delete_empty_albums(&boot_db).await;
let dedup = engine::pipeline::phase_dedup_albums(&boot_db, &boot_search_db).await;
if empty > 0 || dedup > 0 {
info!("[启动] 清理完成:删除空相册 {},去重删除 {}", empty, dedup);
}
// ③ 查找新相册 / 半成品
info!("[启动] ③ 查找新相册...");
let dirty = engine::pipeline::phase_collect_new_albums(&boot_db).await;
let new_count = dirty.len();
if new_count > 0 {
@@ -134,8 +142,8 @@ async fn main() -> std::io::Result<()> {
info!("[启动] 没有新相册");
}
// ③ 刷新所有内存缓存(从 search.db 读取)
info!("[启动] ③ 刷新所有内存缓存...");
// ④ 刷新所有内存缓存(从 search.db 读取)
info!("[启动] ④ 刷新所有内存缓存...");
cache::refresh_all_caches(&boot_db, &boot_search_db, &boot_albums_cache, &boot_persons_cache, &boot_tags_cache).await;
info!("[启动] 启动管线执行完毕(新相册={})", new_count);
});