Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb')
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb b/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb
index d485e8b4f72..05e29f2d885 100644
--- a/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb
+++ b/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb
@@ -23,7 +23,7 @@ module Gitlab
::Project
.select(:id)
.where(Project.arel_table[:created_at].gteq(start)) # rubocop:disable UsageData/LargeTable
- .order(created_at: :asc).limit(1).first&.id
+ .order(created_at: :asc).order(id: :asc).limit(1).first&.id
end
end
end
@@ -36,7 +36,7 @@ module Gitlab
::Project
.select(:id)
.where(Project.arel_table[:created_at].lteq(finish)) # rubocop:disable UsageData/LargeTable
- .order(created_at: :desc).limit(1).first&.id
+ .order(created_at: :desc).order(id: :desc).limit(1).first&.id
end
end
end