1.调整执行器用例

2.调整执行器class初始化位置
This commit is contained in:
sikadai
2022-02-10 18:15:00 +08:00
parent 5c4f26f00c
commit c513da7314
2 changed files with 3 additions and 3 deletions

View File

@@ -47,14 +47,14 @@ public class ComponentInitializer {
//先从组件上取@RetryCount标注如果没有则看全局配置全局配置如果不配置的话默认是0
//默认retryForExceptions为Exception.class
LiteflowRetry liteflowRetryAnnotation = AnnotationUtils.getAnnotation(nodeComponent.getClass(), LiteflowRetry.class);
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
if (ObjectUtil.isNotNull(liteflowRetryAnnotation)) {
nodeComponent.setRetryCount(liteflowRetryAnnotation.retry());
nodeComponent.setRetryForExceptions(liteflowRetryAnnotation.forExceptions());
} else {
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
nodeComponent.setRetryCount(liteflowConfig.getRetryCount());
nodeComponent.setNodeExecutorClass(liteflowConfig.getNodeExecutorClass());
}
nodeComponent.setNodeExecutorClass(liteflowConfig.getNodeExecutorClass());
return nodeComponent;
}

View File

@@ -1,4 +1,4 @@
liteflow.rule-source=nodeExecutor/flow.xml
liteflow.retry-count=3
liteflow.slot-size=512
liteflow.node-executor=com.yomahub.liteflow.entity.executor.DefaultNodeExecutor
liteflow.node-executor-class=com.yomahub.liteflow.entity.executor.DefaultNodeExecutor