Commit 276177a5 by huangfusuper

死锁BUG

parent 22a70438
......@@ -972,7 +972,6 @@ public class ApiFlowServiceImpl implements ApiFlowService {
@Override
public void repairFlow(String param) {
ValidationUtil.dataNotBank(param, "请求参数不允许为空!");
JSONObject jsonObject = JSON.parseObject(param);
//获取工作空间名称
......@@ -998,8 +997,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
ValidationUtil.dataNotNull(flow, flowName + "工作流不存在");
List<Node> nodeList = nodeMapper.findByFlowIdAndName(flow.getFlowId(), nodeNameList);
RedissLockUtil.lock(flow.getFlowId().toString(), 60);
try{
RedissLockUtil.lock(flow.getFlowId().toString(), 60);
//设置触发时间
Long triggerTime = System.currentTimeMillis();
......@@ -1040,9 +1040,11 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingTaskMapper.insertSelective(waitingTask);
});
}
}catch (Exception e) {
e.printStackTrace();
}finally {
RedissLockUtil.unlock(flow.getFlowId().toString());
}
}
......
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