|
@@ -17,19 +17,17 @@ public class TaskController {
|
|
|
|
|
|
@Resource
|
|
|
private TaskService taskService;
|
|
|
-
|
|
|
- // -------------------------------- Comment --------------------------------
|
|
|
+ //* -------------------------------- Comment --------------------------------
|
|
|
|
|
|
/**
|
|
|
- * 修改任务状态
|
|
|
+ * 任务执行前调用该接口,确定该任务没有被终止
|
|
|
*/
|
|
|
- @GetMapping("/state")
|
|
|
- public void state(@RequestParam("taskId") String taskId, @RequestParam("state") String state, @RequestParam("podName") String podName) {
|
|
|
- taskService.state(taskId, state, podName);
|
|
|
+ @GetMapping("/confirm")
|
|
|
+ public Boolean confirm(@RequestParam("taskId") String taskId) {
|
|
|
+ return taskService.confirm(taskId);
|
|
|
}
|
|
|
|
|
|
- //* -------------------------------- Comment --------------------------------
|
|
|
-
|
|
|
+ // -------------------------------- Comment --------------------------------
|
|
|
|
|
|
/**
|
|
|
* Pod 的心跳接口
|
|
@@ -38,13 +36,14 @@ public class TaskController {
|
|
|
public void tick(@RequestParam("taskId") String taskId) {
|
|
|
taskService.tick(taskId);
|
|
|
}
|
|
|
+ //* -------------------------------- Comment --------------------------------
|
|
|
|
|
|
/**
|
|
|
- * 任务执行前调用该接口,确定该任务没有被终止
|
|
|
+ * 修改任务状态
|
|
|
*/
|
|
|
- @GetMapping("/confirm")
|
|
|
- public Boolean confirm(@RequestParam("taskId") String taskId) {
|
|
|
- return taskService.confirm(taskId);
|
|
|
+ @GetMapping("/state")
|
|
|
+ public void state(@RequestParam("taskId") String taskId, @RequestParam("state") String state, @RequestParam("podName") String podName) {
|
|
|
+ taskService.state(taskId, state, podName);
|
|
|
}
|
|
|
|
|
|
|