update code level

This commit is contained in:
lychang
2026-03-28 12:56:30 +08:00
parent 675a402848
commit eb43c145cc
6 changed files with 446 additions and 33 deletions

View File

@@ -386,7 +386,7 @@ impl TaskQueue {
false
}
/// 启动定期清理过期任务
pub async fn start_periodic_cleanup(self: Arc<Self>, interval_duration: Duration) {
let queue = Arc::clone(&self);
@@ -790,24 +790,6 @@ impl AlbumImportWorker {
pub struct TaskFactory;
impl TaskFactory {
/// 创建缩略图生成任务
pub fn create_thumbnail_task(
image_id: Uuid,
original_data: Vec<u8>,
priority: TaskPriority,
) -> Task {
Task {
id: Uuid::new_v4(),
task_type: TaskType::ThumbnailGeneration,
priority,
created_at: Instant::now(),
data: TaskData::ThumbnailGeneration {
image_id,
original_data,
},
}
}
/// 创建相册导入任务
pub fn create_album_import_task(album_path: String, album_data: Option<Vec<u8>>) -> Task {
Task {