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 0000000000000000000000000000000000000000..7681ea912554c3c2677b232ad5d0ff7ceb279c2e --- /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 4e88fb04171d7becbb23c6cc9f37d3d0bd3f11e3..e132b6cc62e1d6c594a669ae73ecbcc2dc771a43 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 0000000000000000000000000000000000000000..c4f773f21ebe56d4a0d595f1d76554f82a9be3c4 --- /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 35d353c992bd520be5d742568926353cae152553..04b2e696db588db61987e419d20a46a730427a74 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 0000000000000000000000000000000000000000..5a0f7773bd24d5f4ee285871a52ee85288f54fe8 --- /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 1b85fd3082e4f6ee8c52026c4cc6601373f25e73..57c352f8956e5edfb936e9d01e29ae92cba864a2 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); }