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:
authorAndreas Brandl <abrandl@gitlab.com>2018-10-28 20:01:17 +0300
committerAndreas Brandl <abrandl@gitlab.com>2018-12-03 23:26:49 +0300
commit72347448db55f738407d468833bbb98fe56ff677 (patch)
tree741701ababd520af43347dc6d75d4f67f38e0c55 /lib/gitlab/database
parent01c7cb90dabc095ae9d343e7af889c43e895c7c1 (diff)
More specs for fallback testing.
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r--lib/gitlab/database/count.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/database/count.rb b/lib/gitlab/database/count.rb
index 863a0e95fd4..e244bf40bbf 100644
--- a/lib/gitlab/database/count.rb
+++ b/lib/gitlab/database/count.rb
@@ -29,6 +29,9 @@ module Gitlab
strategies.each_with_object({}) do |strategy, counts_by_model|
if strategy.enabled?
models_with_missing_counts = models - counts_by_model.keys
+
+ return counts_by_model if models_with_missing_counts.empty?
+
counts = strategy.new(models_with_missing_counts).count
counts.each do |model, count|