|
@@ -7,8 +7,8 @@ import com.css.simulation.resource.scheduler.data.entity.TaskEntity;
|
|
import com.css.simulation.resource.scheduler.mapper.TaskMapper;
|
|
import com.css.simulation.resource.scheduler.mapper.TaskMapper;
|
|
import com.css.simulation.resource.scheduler.util.ProjectUtil;
|
|
import com.css.simulation.resource.scheduler.util.ProjectUtil;
|
|
import com.css.simulation.resource.scheduler.util.TaskUtil;
|
|
import com.css.simulation.resource.scheduler.util.TaskUtil;
|
|
-import lombok.SneakyThrows;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -28,7 +28,7 @@ public class TaskService {
|
|
|
|
|
|
// -------------------------------- Comment --------------------------------
|
|
// -------------------------------- Comment --------------------------------
|
|
|
|
|
|
- @SneakyThrows
|
|
|
|
|
|
+ @Async("pool-default")
|
|
public void state(String taskId, String state, String podName) {
|
|
public void state(String taskId, String state, String podName) {
|
|
TaskEntity taskEntity = taskMapper.selectById(taskId);
|
|
TaskEntity taskEntity = taskMapper.selectById(taskId);
|
|
String projectId = taskEntity.getPId(); // 项目 id
|
|
String projectId = taskEntity.getPId(); // 项目 id
|