mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
1.调整执行器用例
2.调整执行器class初始化位置
This commit is contained in:
@@ -47,14 +47,14 @@ public class ComponentInitializer {
|
|||||||
//先从组件上取@RetryCount标注,如果没有,则看全局配置,全局配置如果不配置的话,默认是0
|
//先从组件上取@RetryCount标注,如果没有,则看全局配置,全局配置如果不配置的话,默认是0
|
||||||
//默认retryForExceptions为Exception.class
|
//默认retryForExceptions为Exception.class
|
||||||
LiteflowRetry liteflowRetryAnnotation = AnnotationUtils.getAnnotation(nodeComponent.getClass(), LiteflowRetry.class);
|
LiteflowRetry liteflowRetryAnnotation = AnnotationUtils.getAnnotation(nodeComponent.getClass(), LiteflowRetry.class);
|
||||||
|
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
|
||||||
if (ObjectUtil.isNotNull(liteflowRetryAnnotation)) {
|
if (ObjectUtil.isNotNull(liteflowRetryAnnotation)) {
|
||||||
nodeComponent.setRetryCount(liteflowRetryAnnotation.retry());
|
nodeComponent.setRetryCount(liteflowRetryAnnotation.retry());
|
||||||
nodeComponent.setRetryForExceptions(liteflowRetryAnnotation.forExceptions());
|
nodeComponent.setRetryForExceptions(liteflowRetryAnnotation.forExceptions());
|
||||||
} else {
|
} else {
|
||||||
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
|
|
||||||
nodeComponent.setRetryCount(liteflowConfig.getRetryCount());
|
nodeComponent.setRetryCount(liteflowConfig.getRetryCount());
|
||||||
nodeComponent.setNodeExecutorClass(liteflowConfig.getNodeExecutorClass());
|
|
||||||
}
|
}
|
||||||
|
nodeComponent.setNodeExecutorClass(liteflowConfig.getNodeExecutorClass());
|
||||||
|
|
||||||
return nodeComponent;
|
return nodeComponent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
liteflow.rule-source=nodeExecutor/flow.xml
|
liteflow.rule-source=nodeExecutor/flow.xml
|
||||||
liteflow.retry-count=3
|
liteflow.retry-count=3
|
||||||
liteflow.slot-size=512
|
liteflow.slot-size=512
|
||||||
liteflow.node-executor=com.yomahub.liteflow.entity.executor.DefaultNodeExecutor
|
liteflow.node-executor-class=com.yomahub.liteflow.entity.executor.DefaultNodeExecutor
|
||||||
Reference in New Issue
Block a user