diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt b/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt index ee6ee51c91..0611bf6702 100644 --- a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt +++ b/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt @@ -39,6 +39,7 @@ import com.tencent.bkrepo.job.batch.utils.RepositoryCommonUtils import com.tencent.bkrepo.job.config.properties.NodeCopyJobProperties import com.tencent.bkrepo.job.exception.JobExecuteException import com.tencent.bkrepo.repository.constant.DEFAULT_STORAGE_CREDENTIALS_KEY +import java.time.Duration import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.data.mongodb.core.query.Criteria import org.springframework.data.mongodb.core.query.Query @@ -60,6 +61,8 @@ class NodeCopyJob( return super.start() } + override fun getLockAtMostFor(): Duration = Duration.ofDays(3) + override fun collectionNames(): List { return (0 until SHARDING_COUNT) .map { "$COLLECTION_NAME_PREFIX$it" }