Commit 9275b0f0 by huangfusuper

修改任务超时时间

parent ef5a5d42
......@@ -41,6 +41,7 @@ import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
......@@ -178,8 +179,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
flow.setScheduleFollow(StringUtils.isEmpty(pluginFlow.getConfig().getScheduleFollow()) ? "1" : pluginFlow.getConfig().getScheduleFollow());
flow.setFlowCron(pluginFlow.getConfig().getFlowCron());
flow.setTriggerNextTime(StringUtils.isEmpty(pluginFlow.getConfig().getFlowCron()) ? null : new CronExpression(pluginFlow.getConfig().getFlowCron()).getNextValidTimeAfter(new Date()).getTime());
//设置超时时间,未设置默认30分钟
flow.setFlowTimeout(null == pluginFlow.getConfig().getFlowTimeout() ? 1000 * 60 * 120 : pluginFlow.getConfig().getFlowTimeout());
//设置超时时间,未设置默认5天
flow.setFlowTimeout(null == pluginFlow.getConfig().getFlowTimeout() ? TimeUnit.DAYS.toMillis(5) : pluginFlow.getConfig().getFlowTimeout());
Flow oldFlow = flowMapper.getByWorkSpaceAndName(workspaceId, pluginFlow.getName());
//判断是否是重发
if ((pluginFlow.isRePublish() && !isInnner) || (isInnner && null != oldFlow)) {
......
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