lib/data_update_scripts/20200924140813_remove_reaction_index_by_name.rb

Summary

Maintainability
A
0 mins
Test Coverage
module DataUpdateScripts
  class RemoveReactionIndexByName
    def run
      index_name = "reactions_#{Rails.env}"
      return unless Search::Client.indices.exists(index: index_name)

      Search::Client.indices.delete(index: index_name)
    end
  end
end