feat(files): add v2 task and metadata workflows
This commit is contained in:
@@ -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()
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user