diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 12:09:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 12:09:17 +0300 |
commit | eaea945e0355826c58c3dcf887496ea91064f85c (patch) | |
tree | 0f20e03304d35e68375e99a606b9b94483e37ee5 /lib | |
parent | cce8cf03d3bebe8b05375e4db0004328f84b28a2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/database/batch_count.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/usage_data.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/database/batch_count.rb b/lib/gitlab/database/batch_count.rb index 5987dc34801..1faaac95575 100644 --- a/lib/gitlab/database/batch_count.rb +++ b/lib/gitlab/database/batch_count.rb @@ -19,8 +19,8 @@ module Gitlab module Database module BatchCount - def batch_count(relation, column = nil, batch_size: nil) - BatchCounter.new(relation, column: column).count(batch_size: batch_size) + def batch_count(relation, column = nil, batch_size: nil, start: nil, finish: nil) + BatchCounter.new(relation, column: column).count(batch_size: batch_size, start: start, finish: finish) end def batch_distinct_count(relation, column = nil, batch_size: nil, start: nil, finish: nil) diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index c5d2d8be022..7277d288d63 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -240,9 +240,9 @@ module Gitlab {} # augmented in EE end - def count(relation, column = nil, fallback: -1, batch: true) + def count(relation, column = nil, fallback: -1, batch: true, start: nil, finish: nil) if batch && Feature.enabled?(:usage_ping_batch_counter, default_enabled: true) - Gitlab::Database::BatchCount.batch_count(relation, column) + Gitlab::Database::BatchCount.batch_count(relation, column, start: start, finish: finish) else relation.count end |