update code level

This commit is contained in:
lychang
2026-07-21 03:10:27 +08:00
parent 49c0a0d307
commit f1dba9f24d
6 changed files with 825 additions and 0 deletions

View File

@@ -226,6 +226,13 @@ impl Database {
Ok(id)
}
/// 将所有相册重置为未处理状态(processed_at = NULL),下次管线会重新解析全部相册
pub async fn reset_all_processed_at(&self) -> usize {
sqlx::query("UPDATE albums SET processed_at = NULL")
.execute(&self.pool).await.unwrap_or_default()
.rows_affected() as usize
}
pub async fn delete_album(&self, album_id: Uuid) -> Result<(), sqlx::Error> {
let _guard = self.write_lock.lock().await;
let aid = album_id.to_string();