diff --git a/src/backend/ci/core/common/common-api/src/main/kotlin/com/tencent/devops/common/api/pojo/agent/AgentErrorExitData.kt b/src/backend/ci/core/common/common-api/src/main/kotlin/com/tencent/devops/common/api/pojo/agent/AgentErrorExitData.kt index e979d260448..9802c931486 100644 --- a/src/backend/ci/core/common/common-api/src/main/kotlin/com/tencent/devops/common/api/pojo/agent/AgentErrorExitData.kt +++ b/src/backend/ci/core/common/common-api/src/main/kotlin/com/tencent/devops/common/api/pojo/agent/AgentErrorExitData.kt @@ -1,13 +1,6 @@ package com.tencent.devops.common.api.pojo.agent data class AgentErrorExitData( - val errorEnum: AgentErrorExitErrorEnum, + val errorEnum: String, val message: String? ) - -enum class AgentErrorExitErrorEnum { - THIRD_AGENT_EXIT_NOT_WORKER, - THIRD_AGENT_EXIT_LEFT_DEVICE, - THIRD_AGENT_EXIT_PERMISSION_DENIED -} - diff --git a/src/backend/ci/core/environment/biz-environment/src/main/kotlin/com/tencent/devops/environment/service/thirdPartyAgent/ThirdPartyAgentMgrService.kt b/src/backend/ci/core/environment/biz-environment/src/main/kotlin/com/tencent/devops/environment/service/thirdPartyAgent/ThirdPartyAgentMgrService.kt index fc921a14100..d9e47b5cce7 100644 --- a/src/backend/ci/core/environment/biz-environment/src/main/kotlin/com/tencent/devops/environment/service/thirdPartyAgent/ThirdPartyAgentMgrService.kt +++ b/src/backend/ci/core/environment/biz-environment/src/main/kotlin/com/tencent/devops/environment/service/thirdPartyAgent/ThirdPartyAgentMgrService.kt @@ -38,7 +38,6 @@ import com.tencent.devops.common.api.exception.PermissionForbiddenException import com.tencent.devops.common.api.pojo.AgentResult import com.tencent.devops.common.api.pojo.OS import com.tencent.devops.common.api.pojo.Page -import com.tencent.devops.common.api.pojo.agent.AgentErrorExitErrorEnum import com.tencent.devops.common.api.pojo.agent.NewHeartbeatInfo import com.tencent.devops.common.api.util.ApiUtil import com.tencent.devops.common.api.util.DateTimeUtil @@ -236,8 +235,8 @@ class ThirdPartyAgentMgrService @Autowired(required = false) constructor( return tpad } - private fun trans(enum: AgentErrorExitErrorEnum, userId: String): String { - return MessageUtil.getMessageByLocale(enum.name, I18nUtil.getLanguage(userId)) + private fun trans(enum: String, userId: String): String { + return MessageUtil.getMessageByLocale(enum, I18nUtil.getLanguage(userId)) } private fun getAgentProperties(agentRecord: TEnvironmentThirdpartyAgentRecord): AgentProps? {