diff --git a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/search/packages/PackageSearchInterpreter.kt b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/search/packages/PackageSearchInterpreter.kt index 3e5b213b8e..0a791b959b 100644 --- a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/search/packages/PackageSearchInterpreter.kt +++ b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/search/packages/PackageSearchInterpreter.kt @@ -31,6 +31,7 @@ package com.tencent.bkrepo.common.metadata.search.packages +import com.tencent.bkrepo.common.metadata.condition.SyncCondition import com.tencent.bkrepo.common.metadata.permission.PermissionManager import com.tencent.bkrepo.common.query.interceptor.QueryContext import com.tencent.bkrepo.common.query.model.QueryModel @@ -41,11 +42,13 @@ import com.tencent.bkrepo.common.metadata.search.common.ModelValidateInterceptor import com.tencent.bkrepo.common.metadata.search.common.RepoNameRuleInterceptor import com.tencent.bkrepo.common.metadata.search.common.RepoTypeRuleInterceptor import com.tencent.bkrepo.common.metadata.search.common.SelectFieldInterceptor +import org.springframework.context.annotation.Conditional import org.springframework.data.mongodb.core.query.Query import org.springframework.stereotype.Component import javax.annotation.PostConstruct @Component +@Conditional(SyncCondition::class) class PackageSearchInterpreter( private val permissionManager: PermissionManager, private val repoNameRuleInterceptor: RepoNameRuleInterceptor, diff --git a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/service/node/impl/PipelineNodeServiceImpl.kt b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/service/node/impl/PipelineNodeServiceImpl.kt index d988179197..22e8cfe131 100644 --- a/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/service/node/impl/PipelineNodeServiceImpl.kt +++ b/src/backend/common/common-metadata/metadata-service/src/main/kotlin/com/tencent/bkrepo/common/metadata/service/node/impl/PipelineNodeServiceImpl.kt @@ -30,13 +30,16 @@ package com.tencent.bkrepo.common.metadata.service.node.impl import com.tencent.bkrepo.auth.api.ServicePipelineClient import com.tencent.bkrepo.common.artifact.api.DefaultArtifactInfo import com.tencent.bkrepo.common.artifact.path.PathUtils +import com.tencent.bkrepo.common.metadata.condition.SyncCondition import com.tencent.bkrepo.repository.pojo.node.NodeInfo import com.tencent.bkrepo.repository.pojo.node.NodeListOption import com.tencent.bkrepo.common.metadata.service.node.NodeService import com.tencent.bkrepo.common.metadata.service.node.PipelineNodeService +import org.springframework.context.annotation.Conditional import org.springframework.stereotype.Service @Service +@Conditional(SyncCondition::class) class PipelineNodeServiceImpl( private val nodeService: NodeService, private val servicePipelineClient: ServicePipelineClient