Commit d46477e9 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'rs-elastic-tasks' into 'master'

Add `gitlab:elastic:index` task that rolls up all other index tasks

Also improves consistency of the task descriptions.

See merge request !240
parents 155f648e bb6e887e
namespace :gitlab do
namespace :elastic do
desc "Indexing repositories"
desc "GitLab | Update Elasticsearch indexes"
task :index do
Rake::Task["gitlab:elastic:index_repositories"].invoke
Rake::Task["gitlab:elastic:index_wikis"].invoke
Rake::Task["gitlab:elastic:index_database"].invoke
end
desc "GitLab | Update Elasticsearch indexes for project repositories"
task index_repositories: :environment do
Repository.__elasticsearch__.create_index!
......@@ -47,7 +54,7 @@ namespace :gitlab do
end
end
desc "Indexing all wikis"
desc "GitLab | Update Elasticsearch indexes for wiki repositories"
task index_wikis: :environment do
ProjectWiki.__elasticsearch__.create_index!
......@@ -66,7 +73,7 @@ namespace :gitlab do
end
end
desc "Create indexes in the Elasticsearch from database records"
desc "GitLab | Update Elasticsearch indexes for all database objects"
task index_database: :environment do
[Project, Issue, MergeRequest, Snippet, Note, Milestone].each do |klass|
klass.__elasticsearch__.create_index!
......@@ -79,7 +86,7 @@ namespace :gitlab do
end
end
desc "Create empty indexes"
desc "GitLab | Create empty Elasticsearch indexes"
task create_empty_indexes: :environment do
[
Project,
......@@ -107,4 +114,4 @@ namespace :gitlab do
projects
end
end
end
\ No newline at end of file
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment