Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit fd95b5c

Browse files
committed
feat: add new cron task for syncing published images to S3
- Introduced a new cron task type, SyncPublishedImagesToS3, to facilitate the synchronization of published images to S3. - Updated the cron task API to modify the request parameters for deleting tasks, enhancing the API's consistency. These changes expand the functionality of the cron task management system, improving image handling capabilities. Signed-off-by: Innei <tukon479@gmail.com>
1 parent 2cf5c6a commit fd95b5c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/api/cron-task.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export enum CronTaskType {
99
PushToBingSearch = 'cron:push-to-bing-search',
1010
DeleteExpiredJWT = 'cron:delete-expired-jwt',
1111
CleanupOrphanImages = 'cron:cleanup-orphan-images',
12+
SyncPublishedImagesToS3 = 'cron:sync-published-images-to-s3',
1213
}
1314

1415
export enum CronTaskStatus {
@@ -95,6 +96,5 @@ export const cronTaskApi = {
9596
status?: CronTaskStatus
9697
type?: CronTaskType
9798
before: number
98-
}) =>
99-
request.delete<{ deleted: number }>('/cron-task/tasks', { data: params }),
99+
}) => request.delete<{ deleted: number }>('/cron-task/tasks', { params }),
100100
}

src/views/maintenance/cron.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const TaskTypeLabels: Record<CronTaskType, string> = {
4545
[CronTaskType.PushToBingSearch]: '推送 Bing 搜索',
4646
[CronTaskType.DeleteExpiredJWT]: '删除过期 JWT',
4747
[CronTaskType.CleanupOrphanImages]: '清理孤儿图片',
48+
[CronTaskType.SyncPublishedImagesToS3]: '同步图片到 S3',
4849
}
4950

5051
const TaskStatusLabels: Record<CronTaskStatus, string> = {

0 commit comments

Comments
 (0)