feat(files): add v2 task and metadata workflows

This commit is contained in:
yoyuzh
2026-04-09 00:42:41 +08:00
parent c5362ebe31
commit 977eb60b17
60 changed files with 5218 additions and 72 deletions

View File

@@ -0,0 +1,30 @@
package com.yoyuzh.files;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.Map;
import java.util.Set;
@Component
public class NoopBackgroundTaskHandler implements BackgroundTaskHandler {
private static final Set<BackgroundTaskType> SUPPORTED_TYPES = Set.of(
BackgroundTaskType.ARCHIVE,
BackgroundTaskType.EXTRACT
);
@Override
public boolean supports(BackgroundTaskType type) {
return SUPPORTED_TYPES.contains(type);
}
@Override
public BackgroundTaskHandlerResult handle(BackgroundTask task) {
return new BackgroundTaskHandlerResult(Map.of(
"worker", "noop",
"message", "worker skeleton accepted task without running real file processing",
"completedAt", LocalDateTime.now().toString()
));
}
}