From ee8b23afd997a98a2a57b6841422c418fc35d7d0 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Fri, 20 Jun 2025 18:53:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=94=A8=E7=8E=AF=E5=A2=83=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=E6=8E=A7=E5=88=B6runner=E7=BB=84=E8=8C=83=E5=9B=B4=20#[1437065?= =?UTF-8?q?558851584]=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=94=A8=E7=8E=AF=E5=A2=83=E5=85=A5=E5=8F=A3=E6=8E=A7=E5=88=B6?= =?UTF-8?q?runner=E7=BB=84=E8=8C=83=E5=9B=B4=20http://192.168.0.96:8090/de?= =?UTF-8?q?mo/rdm.html#/story-detail/939050947543040/939050947543042/14370?= =?UTF-8?q?65558851584?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cRunnerGroupNotFoundByTagAndRuleException.java | 15 +++++++++++++++ ...AutoexecRunnerGroupNotFoundByTagException.java | 2 +- .../AutoexecRunnerGroupRuleNotMatchException.java | 15 +++++++++++++++ .../AutoexecRunnerGroupTagNotMatchException.java | 2 +- .../AutoexecRunnerTagNotMatchException.java | 13 +++++++++++++ .../action/core/AutoexecJobActionHandlerBase.java | 2 +- 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagAndRuleException.java create mode 100644 src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupRuleNotMatchException.java create mode 100644 src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerTagNotMatchException.java diff --git a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagAndRuleException.java b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagAndRuleException.java new file mode 100644 index 00000000..7681ea91 --- /dev/null +++ b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagAndRuleException.java @@ -0,0 +1,15 @@ +package neatlogic.framework.autoexec.exception; + +import neatlogic.framework.autoexec.dto.job.AutoexecJobPhaseVo; +import neatlogic.framework.exception.core.ApiRuntimeException; + +public class AutoexecRunnerGroupNotFoundByTagAndRuleException extends ApiRuntimeException { + + public AutoexecRunnerGroupNotFoundByTagAndRuleException(String value) { + super("nfae.autoexecrunnergroupnotfoundbytagandruleexception.autoexecrunnergroupnotfoundbytagandruleexception", value); + } + + public AutoexecRunnerGroupNotFoundByTagAndRuleException(String value, AutoexecJobPhaseVo jobPhaseVo) { + super("nfae.autoexecrunnergroupnotfoundbytagandruleexception.autoexecrunnergroupnotfoundbytagandruleexceptionphase", jobPhaseVo.getName(), value); + } +} diff --git a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagException.java b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagException.java index 4e88fb04..e132b6cc 100644 --- a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagException.java +++ b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupNotFoundByTagException.java @@ -10,6 +10,6 @@ public class AutoexecRunnerGroupNotFoundByTagException extends ApiRuntimeExcepti } public AutoexecRunnerGroupNotFoundByTagException(String value, AutoexecJobPhaseVo jobPhaseVo) { - super("根据作业阶段”{0}“设置的执行器组标签“{1}”,找不到执行器组", jobPhaseVo.getName(), value); + super("nfae.autoexecrunnergroupnotfoundbytagexception.autoexecrunnergroupnotfoundbytagexceptionphase", jobPhaseVo.getName(), value); } } diff --git a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupRuleNotMatchException.java b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupRuleNotMatchException.java new file mode 100644 index 00000000..c4f773f2 --- /dev/null +++ b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupRuleNotMatchException.java @@ -0,0 +1,15 @@ +package neatlogic.framework.autoexec.exception; + +import neatlogic.framework.dto.runner.RunnerGroupVo; +import neatlogic.framework.exception.core.ApiRuntimeException; + +public class AutoexecRunnerGroupRuleNotMatchException extends ApiRuntimeException { + public AutoexecRunnerGroupRuleNotMatchException(RunnerGroupVo runnerGroupVo, String form) { + super("nfae.autoexecrunnergrouprulenotmatchexception.autoexecrunnergrouprulenotmatchexception", form, runnerGroupVo.getName(), runnerGroupVo.getId()); + } + + public AutoexecRunnerGroupRuleNotMatchException(RunnerGroupVo runnerGroupVo, String form, String formName) { + super("{0}“{3}”设置的执行器组“{1}({2})”,不满足规则", form, runnerGroupVo.getName(), runnerGroupVo.getId(), formName); + } + +} diff --git a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupTagNotMatchException.java b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupTagNotMatchException.java index 35d353c9..04b2e696 100644 --- a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupTagNotMatchException.java +++ b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerGroupTagNotMatchException.java @@ -4,7 +4,7 @@ import neatlogic.framework.exception.core.ApiRuntimeException; public class AutoexecRunnerGroupTagNotMatchException extends ApiRuntimeException { public AutoexecRunnerGroupTagNotMatchException(String value) { - super("不存在执行器(runner)满足:执行器组在标签“{0}”范围内", value); + super("找不到同时满足:标签“{0}”和规则的执行器组", value); } public AutoexecRunnerGroupTagNotMatchException(String runnerGroupFrom, String runnerGroupTagFrom, String runnerGroupName, String runnerGroupTagName) { diff --git a/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerTagNotMatchException.java b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerTagNotMatchException.java new file mode 100644 index 00000000..5a0f7773 --- /dev/null +++ b/src/main/java/neatlogic/framework/autoexec/exception/AutoexecRunnerTagNotMatchException.java @@ -0,0 +1,13 @@ +package neatlogic.framework.autoexec.exception; + +import neatlogic.framework.exception.core.ApiRuntimeException; + +public class AutoexecRunnerTagNotMatchException extends ApiRuntimeException { + public AutoexecRunnerTagNotMatchException(String value) { + super("找不到同时满足:标签“{0}”和规则的执行器组", value); + } + + public AutoexecRunnerTagNotMatchException(String runnerGroupFrom, String runnerGroupTagFrom, String runnerGroupName, String runnerGroupTagName) { + super("nfae.autoexecrunnergrouptagnotmatchexception.autoexecrunnergrouptagnotmatchexception", runnerGroupFrom, runnerGroupName, runnerGroupTagFrom, runnerGroupTagName); + } +} diff --git a/src/main/java/neatlogic/framework/autoexec/job/action/core/AutoexecJobActionHandlerBase.java b/src/main/java/neatlogic/framework/autoexec/job/action/core/AutoexecJobActionHandlerBase.java index 1b85fd30..57c352f8 100644 --- a/src/main/java/neatlogic/framework/autoexec/job/action/core/AutoexecJobActionHandlerBase.java +++ b/src/main/java/neatlogic/framework/autoexec/job/action/core/AutoexecJobActionHandlerBase.java @@ -173,7 +173,7 @@ public abstract class AutoexecJobActionHandlerBase implements IAutoexecJobAction throw new AutoexecJobPhaseNodeNotFoundException(jobVo.getCurrentPhaseId().toString(), jobVo.getCurrentNodeResourceId() == null ? StringUtils.EMPTY : jobVo.getCurrentNodeResourceId().toString()); } if (StringUtils.isBlank(nodeVo.getRunnerUrl())) { - throw new AutoexecJobHostPortRunnerNotFoundException(jobVo.getCurrentNode().getHost() + ":" + jobVo.getCurrentNode().getPort()); + throw new AutoexecJobHostPortRunnerNotFoundException(nodeVo.getHost() + (nodeVo.getPort() != null ? (":" + nodeVo.getPort()) : StringUtils.EMPTY)); } jobVo.setCurrentNode(nodeVo); } -- Gitee