|
|
@ -1452,6 +1452,7 @@ public class WorkflowExecuteThread implements Runnable { |
|
|
|
private void submitStandByTask() { |
|
|
|
private void submitStandByTask() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
int length = readyToSubmitTaskQueue.size(); |
|
|
|
int length = readyToSubmitTaskQueue.size(); |
|
|
|
|
|
|
|
List<TaskInstance> skipSubmitInstances = new ArrayList<>(); |
|
|
|
for (int i = 0; i < length; i++) { |
|
|
|
for (int i = 0; i < length; i++) { |
|
|
|
TaskInstance task = readyToSubmitTaskQueue.peek(); |
|
|
|
TaskInstance task = readyToSubmitTaskQueue.peek(); |
|
|
|
if (task == null) { |
|
|
|
if (task == null) { |
|
|
@ -1472,6 +1473,8 @@ public class WorkflowExecuteThread implements Runnable { |
|
|
|
long failedTimeInterval = DateUtils.differSec(new Date(), retryTask.getEndTime()); |
|
|
|
long failedTimeInterval = DateUtils.differSec(new Date(), retryTask.getEndTime()); |
|
|
|
if ((long) retryTask.getRetryInterval() * SEC_2_MINUTES_TIME_UNIT > failedTimeInterval) { |
|
|
|
if ((long) retryTask.getRetryInterval() * SEC_2_MINUTES_TIME_UNIT > failedTimeInterval) { |
|
|
|
logger.info("task name: {} retry waiting has not exceeded the interval time, and skip submission this time, task id:{}", task.getName(), task.getId()); |
|
|
|
logger.info("task name: {} retry waiting has not exceeded the interval time, and skip submission this time, task id:{}", task.getName(), task.getId()); |
|
|
|
|
|
|
|
readyToSubmitTaskQueue.remove(task); |
|
|
|
|
|
|
|
skipSubmitInstances.add(task); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1512,6 +1515,10 @@ public class WorkflowExecuteThread implements Runnable { |
|
|
|
logger.info("remove task {},id:{} , because depend result : {}", task.getName(), task.getId(), dependResult); |
|
|
|
logger.info("remove task {},id:{} , because depend result : {}", task.getName(), task.getId(), dependResult); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (TaskInstance task : skipSubmitInstances) { |
|
|
|
|
|
|
|
readyToSubmitTaskQueue.put(task); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
skipSubmitInstances.clear(); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("submit standby task error", e); |
|
|
|
logger.error("submit standby task error", e); |
|
|
|
} |
|
|
|
} |
|
|
|