update code level
This commit is contained in:
@@ -75,8 +75,10 @@ pub async fn pipeline_reparse_persons(
|
||||
db: web::Data<Arc<Database>>,
|
||||
search_db: web::Data<Arc<SearchDb>>,
|
||||
) -> impl Responder {
|
||||
// 1. 清除 search.db 中的人物关联(保留 tags 不变)
|
||||
// 1. 清空 search.db 中的人物相关表(album_persons + persons + person_aliases)
|
||||
sqlx::query("DELETE FROM album_persons").execute(&search_db.pool).await.ok();
|
||||
sqlx::query("DELETE FROM person_aliases").execute(&search_db.pool).await.ok();
|
||||
sqlx::query("DELETE FROM persons").execute(&search_db.pool).await.ok();
|
||||
|
||||
// 2. 重置所有相册为未处理(触发管线重新解析)
|
||||
let reset_count = db.reset_all_processed_at().await;
|
||||
@@ -113,8 +115,9 @@ pub async fn pipeline_reparse_tags(
|
||||
db: web::Data<Arc<Database>>,
|
||||
search_db: web::Data<Arc<SearchDb>>,
|
||||
) -> impl Responder {
|
||||
// 1. 清除 search.db 中的标签关联(保留 persons 不变)
|
||||
// 1. 清空 search.db 中的标签相关表(album_tags + tags)
|
||||
sqlx::query("DELETE FROM album_tags").execute(&search_db.pool).await.ok();
|
||||
sqlx::query("DELETE FROM tags").execute(&search_db.pool).await.ok();
|
||||
|
||||
// 2. 重置所有相册为未处理(触发管线重新解析)
|
||||
let reset_count = db.reset_all_processed_at().await;
|
||||
|
||||
Reference in New Issue
Block a user