Optimize event loop (#13193)
This commit is contained in:
parent
43e6ac32dd
commit
be81b222d4
|
|
@ -285,7 +285,7 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> {
|
|||
stateEvents);
|
||||
return;
|
||||
}
|
||||
int loopTimes = stateEvents.size();
|
||||
int loopTimes = stateEvents.size() * 2;
|
||||
for (int i = 0; i < loopTimes; i++) {
|
||||
final StateEvent stateEvent = this.stateEvents.peek();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class WorkflowExecuteThreadPool extends ThreadPoolTaskExecutor {
|
|||
public void onSuccess(Object result) {
|
||||
try {
|
||||
LoggerUtils.setWorkflowInstanceIdMDC(workflowExecuteThread.getProcessInstance().getId());
|
||||
if (workflowExecuteThread.workFlowFinish()) {
|
||||
if (workflowExecuteThread.workFlowFinish() && workflowExecuteThread.eventSize() == 0) {
|
||||
stateWheelExecuteThread
|
||||
.removeProcess4TimeoutCheck(workflowExecuteThread.getProcessInstance().getId());
|
||||
processInstanceExecCacheManager.removeByProcessInstanceId(processInstanceId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue