Commit 12fa503c by guominglei

工具类补充

parent a6775b08
......@@ -55,6 +55,7 @@ public class ApiFlowController {
return "SUCCESS";
}
@PostMapping("killJob")
@ApiOperation("杀死节点")
public Boolean killJob(String param) throws InterruptedException {
......
......@@ -69,6 +69,10 @@ public class JobUtils {
*/
private static final String REQUEST_FLOW_RERUNJOB = "/api/flow/reRunJob";
/**
* 重跑工作流
*/
private static final String REQUEST_FLOW_RERUNFLOW = "/api/flow/reRunFlow";
/**
* 手动置为成功
*/
private static final String REQUEST_FLOW_MAKESUCCESS = "/api/flow/madeSuccess";
......@@ -269,6 +273,27 @@ public class JobUtils {
return addRequestResult;
}
/**
* 重跑工作流
* @param runId
* @param workspaceName
* @param flowName
* @return
*/
public static String reRunFlow(String runId, String workspaceName, String flowName){
//请求的路径
String requestUrl = REQUEST_PREFIX + "127.0.0.1" + ":" + SERVER_PORT + REQUEST_FLOW_RERUNFLOW;
Map<String,String> map = new HashMap<>(5);
map.put("runId",runId);
map.put("workspaceName",workspaceName);
map.put("flowName",flowName);
//发送请求 添加任务
String addRequestResult = HttpUtil.post(requestUrl,"param="+JSON.toJSONString(map,WriteClassName));
log.info("--------------------重跑节点接口调用成功,结果为:{}------------------------",addRequestResult);
return addRequestResult;
}
/**
* 手动置为成功
* @param runId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment