-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alias indexes for provider and client. #302
- Loading branch information
Martin Fenner
committed
Jul 11, 2019
1 parent
fa277d1
commit 7f508a9
Showing
2 changed files
with
70 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,46 @@ | ||
namespace :provider do | ||
desc 'Import all providers' | ||
task :import => :environment do | ||
Provider.__elasticsearch__.create_index! | ||
Provider.import | ||
end | ||
|
||
desc "Create index for providers" | ||
task :create_index => :environment do | ||
Provider.__elasticsearch__.create_index! | ||
puts Provider.create_index | ||
end | ||
|
||
desc "Delete index for providers" | ||
task :delete_index => :environment do | ||
Provider.__elasticsearch__.delete_index! | ||
puts Provider.delete_index | ||
end | ||
|
||
desc "Upgrade index for providers" | ||
task :upgrade_index => :environment do | ||
puts Provider.upgrade_index | ||
end | ||
|
||
desc "Switch index for providers" | ||
task :switch_index => :environment do | ||
puts Provider.switch_index | ||
end | ||
|
||
desc "Return active index for providers" | ||
task :active_index => :environment do | ||
puts Provider.active_index + " is the active index." | ||
end | ||
|
||
desc "Start using alias indexes for providers" | ||
task :start_aliases => :environment do | ||
puts Provider.start_aliases | ||
end | ||
|
||
desc "Monitor reindexing for providers" | ||
task :monitor_reindex => :environment do | ||
puts Provider.monitor_reindex | ||
end | ||
|
||
desc "Refresh index for providers" | ||
task :refresh_index => :environment do | ||
Provider.__elasticsearch__.refresh_index! | ||
desc "Wrap up starting using alias indexes for providers" | ||
task :finish_aliases => :environment do | ||
puts Provider.finish_aliases | ||
end | ||
|
||
desc 'Import all providers' | ||
task :import => :environment do | ||
Provider.import(index: Provider.inactive_index) | ||
end | ||
end |