From 17a726d6c8cfca5714a1c46127ab3aff49f9f96e Mon Sep 17 00:00:00 2001 From: zacYL <100330102+zacYL@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:47:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E5=BC=82=E5=B8=B8=20#2007?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt b/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt index 7ce92197ef..9c19ea9c2f 100644 --- a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt +++ b/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt @@ -98,6 +98,7 @@ open class ProjectRepoMetricsStatJob( ProjectRepoMetricsStatJobContext.ProjectMetrics(projectId) } val data = mongoTemplate.find(query, nodeCollectionName) + if (data.isEmpty()) return data.forEach { runRepoMetrics(metric, row, it) }