task-212(部分): 04 Handler SPI 实现迁回各业务模块(依赖反转大头)——13 个 *ResultFileJobHandler 从 modules/task/service 迁到各自模块 service
- TaskFileJobConfig 与相关测试 import 同步到新模块包;MappingSnapshot 源码路径按模块映射 - task 模块对业务 import 由 16+ 文件降到 3(TaskHeartbeatService/TaskResultFileJobWorker/ModuleHistoryCleanupService 尚需心跳/worker/清理 SPI 化) - 全量回归 2308 测试 0 失败
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
package com.nanri.aiimage.modules.task.service;
|
||||
|
||||
import com.nanri.aiimage.modules.collectdata.service.CollectDataService;
|
||||
import com.nanri.aiimage.modules.task.model.entity.TaskFileJobEntity;
|
||||
|
||||
/**
|
||||
* COLLECT_DATA 结果文件 Job Handler(04 注册表)。
|
||||
* cleanup 为空(原 cleanupAfterSuccess 无 COLLECT_DATA 分支)。
|
||||
*/
|
||||
public class CollectDataResultFileJobHandler implements ResultFileJobHandler {
|
||||
|
||||
private final CollectDataService collectDataService;
|
||||
|
||||
public CollectDataResultFileJobHandler(CollectDataService collectDataService) {
|
||||
this.collectDataService = collectDataService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String moduleType() {
|
||||
return "COLLECT_DATA";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean process(TaskFileJobEntity job) {
|
||||
collectDataService.processResultFileJob(job);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user