图片预热任务

This commit is contained in:
ryan
2026-06-11 17:49:08 +08:00
parent 7da4b72d24
commit 5915b31519
6 changed files with 429 additions and 44 deletions
+7 -1
View File
@@ -89,15 +89,21 @@ func TestListTaskTypes(t *testing.T) {
}
foundCleanup := false
foundWarmImageCache := false
for _, m := range taskMetas {
if m.Type == upload.TaskTypeCleanupUploads {
foundCleanup = true
break
}
if m.Type == upload.TaskTypeWarmImageCache {
foundWarmImageCache = true
}
}
if !foundCleanup {
t.Errorf("expected task type %s to be listed", upload.TaskTypeCleanupUploads)
}
if !foundWarmImageCache {
t.Errorf("expected task type %s to be listed", upload.TaskTypeWarmImageCache)
}
}
func TestDispatchTask(t *testing.T) {