diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2019-06-24 21:31:38 +0300 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2019-07-11 00:14:50 +0300 |
commit | d8cad8837cae22130f2e0975155a3b27a66d878c (patch) | |
tree | 99568d2fea74b637d0c882e7090584a35b1fdeab /lib/gitlab/hashed_storage | |
parent | c1fe76f15ba8d2418c428d2c9e88c133bfc69a6f (diff) |
Display the amount for Hashed Storage migration/rollback correctly
Rake script considers the specified range, if present, to calculate
the affected amount of projects correctly.
Diffstat (limited to 'lib/gitlab/hashed_storage')
-rw-r--r-- | lib/gitlab/hashed_storage/rake_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/hashed_storage/rake_helper.rb b/lib/gitlab/hashed_storage/rake_helper.rb index 87a31a37e3f..14727b03ce9 100644 --- a/lib/gitlab/hashed_storage/rake_helper.rb +++ b/lib/gitlab/hashed_storage/rake_helper.rb @@ -19,8 +19,12 @@ module Gitlab ENV['ID_TO'] end + def self.using_ranges? + !range_from.nil? && !range_to.nil? + end + def self.range_single_item? - !range_from.nil? && range_from == range_to + using_ranges? && range_from == range_to end # rubocop: disable CodeReuse/ActiveRecord |