diff options
Diffstat (limited to 'lib/gitlab/database/reindexing.rb')
-rw-r--r-- | lib/gitlab/database/reindexing.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/database/reindexing.rb b/lib/gitlab/database/reindexing.rb new file mode 100644 index 00000000000..074752fe75b --- /dev/null +++ b/lib/gitlab/database/reindexing.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Gitlab + module Database + module Reindexing + def self.perform(index_selector) + Coordinator.new(index_selector).perform + end + + def self.candidate_indexes + Gitlab::Database::PostgresIndex + .regular + .not_match("^#{ConcurrentReindex::TEMPORARY_INDEX_PREFIX}") + .not_match("^#{ConcurrentReindex::REPLACED_INDEX_PREFIX}") + end + end + end +end |