[DS-6737][MasterServer] fix event handle twice (#6738)

Co-authored-by: caishunfeng <534328519@qq.com>
This commit is contained in:
wind 2021-11-08 16:54:58 +08:00 committed by lenboo
parent 98465b1281
commit 523357f574
1 changed files with 6 additions and 9 deletions

View File

@ -104,10 +104,7 @@ public class WorkflowExecuteThread implements Runnable {
* runing TaskNode
*/
private final Map<Integer, ITaskProcessor> activeTaskProcessorMaps = new ConcurrentHashMap<>();
/**
* task exec service
*/
private final ExecutorService taskExecService;
/**
* process instance
*/
@ -216,9 +213,6 @@ public class WorkflowExecuteThread implements Runnable {
this.processInstance = processInstance;
this.masterConfig = masterConfig;
int masterTaskExecNum = masterConfig.getMasterExecTaskNum();
this.taskExecService = ThreadUtils.newDaemonFixedThreadExecutor("Master-Task-Exec-Thread",
masterTaskExecNum);
this.nettyExecutorManager = nettyExecutorManager;
this.processAlertManager = processAlertManager;
this.taskTimeoutCheckList = taskTimeoutCheckList;
@ -227,8 +221,11 @@ public class WorkflowExecuteThread implements Runnable {
@Override
public void run() {
try {
startProcess();
handleEvents();
if (!this.isStart()) {
startProcess();
} else {
handleEvents();
}
} catch (Exception e) {
logger.error("handler error:", e);
}