[Bug-9295][Master] fix repeated submit task (#9304)

Co-authored-by: caishunfeng <534328519@qq.com>
dependabot/maven/org.springframework-spring-beans-5.3.18
caishunfeng 2022-03-31 21:10:09 +08:00 committed by GitHub
parent 81f9b876f9
commit 1073fcae44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -186,8 +186,10 @@ public class TaskPriorityQueueConsumer extends Thread {
if (result) {
addDispatchEvent(context, executionContext);
}
} catch (RuntimeException | ExecuteException e) {
logger.error("dispatch error: {}", e.getMessage(), e);
} catch (RuntimeException e) {
logger.error("dispatch error: ", e);
} catch (ExecuteException e) {
logger.error("dispatch error: {}", e.getMessage());
}
return result;
}

View File

@ -110,8 +110,8 @@ public class TaskExecuteThreadPool extends ThreadPoolTaskExecutor {
return;
}
ListenableFuture future = this.submitListenable(() -> {
taskExecuteThread.run();
multiThreadFilterMap.put(taskExecuteThread.getKey(), taskExecuteThread);
taskExecuteThread.run();
});
future.addCallback(new ListenableFutureCallback() {
@Override

View File

@ -109,8 +109,8 @@ public class WorkflowExecuteThreadPool extends ThreadPoolTaskExecutor {
}
int processInstanceId = workflowExecuteThread.getProcessInstance().getId();
ListenableFuture future = this.submitListenable(() -> {
workflowExecuteThread.handleEvents();
multiThreadFilterMap.put(workflowExecuteThread.getKey(), workflowExecuteThread);
workflowExecuteThread.handleEvents();
});
future.addCallback(new ListenableFutureCallback() {
@Override