update tag translation now can run as a normal task

This commit is contained in:
2024-10-03 19:59:03 +08:00
parent 8b5bc62a90
commit 2864d4d107
7 changed files with 143 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ export enum TaskType {
UpdateMeiliSearchData,
FixGalleryPage,
Import,
UpdateTagTranslation,
}
export type Task<T extends TaskType = TaskType> = {
@@ -59,12 +60,18 @@ export type TaskImportProgress = {
total_page: number;
};
export type TaskUpdateTagTranslationProgress = {
added_tag: number;
total_tag: number;
};
export type TaskProgressBasicType = {
[TaskType.Download]: TaskDownloadProgess;
[TaskType.ExportZip]: TaskExportZipProgress;
[TaskType.UpdateMeiliSearchData]: TaskUpdateMeiliSearchDataProgress;
[TaskType.FixGalleryPage]: TaskFixGalleryPageProgress;
[TaskType.Import]: TaskImportProgress;
[TaskType.UpdateTagTranslation]: TaskUpdateTagTranslationProgress;
};
export type TaskProgress<T extends TaskType = TaskType> = {