update code level
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user