You've already forked FrameTour-BE
任务调度修改
This commit is contained in:
@ -53,4 +53,6 @@ public interface TaskMapper {
|
||||
TaskEntity get(Long taskId);
|
||||
|
||||
List<TaskEntity> listEntity(TaskReqQuery taskReqQuery);
|
||||
|
||||
List<TaskRespVO> selectNotRunningByScenicId(Long scenicOnly);
|
||||
}
|
||||
|
@ -185,7 +185,12 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
try {
|
||||
if (lock.tryLock(2, TimeUnit.SECONDS)) {
|
||||
try {
|
||||
List<TaskRespVO> taskList = taskMapper.selectNotRunning();
|
||||
List<TaskRespVO> taskList;
|
||||
if (worker.getScenicOnly() != null) {
|
||||
taskList = taskMapper.selectNotRunningByScenicId(worker.getScenicOnly());
|
||||
} else {
|
||||
taskList = taskMapper.selectNotRunning();
|
||||
}
|
||||
resp.setTasks(taskList);
|
||||
resp.setTemplates(updTemplateList);
|
||||
taskList.forEach(task -> {
|
||||
|
Reference in New Issue
Block a user