Skip to content

Commit

Permalink
Merge pull request #751 from datacite/pr_local_run_fix
Browse files Browse the repository at this point in the history
fix rake tasks for latests migrations changes
  • Loading branch information
kjgarza authored Aug 10, 2021
2 parents 1631423 + d7dd846 commit 475b5a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/seeds/development/base.seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:client,
provider: provider,
symbol: ENV["MDS_USERNAME"],
password: ENV["MDS_PASSWORD"],
password_input: ENV["MDS_PASSWORD"],
)
if Prefix.where(uid: "10.14454").blank?
prefix = FactoryBot.create(:prefix, uid: "10.14454")
Expand Down
21 changes: 20 additions & 1 deletion lib/tasks/elasticsearch.rake
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,29 @@ namespace :elasticsearch do
fail "These tasks can only be used in the development enviroment" if Rails.env.production?

Rake::Task["provider:create_index"].invoke
Rake::Task["provider:create_alias"].invoke

Rake::Task["client:create_index"].invoke
Rake::Task["client:create_alias"].invoke

Rake::Task["prefix:create_index"].invoke
Rake::Task["prefix:create_alias"].invoke

Rake::Task["provider_prefix:create_index"].invoke
Rake::Task["provider_prefix:create_alias"].invoke

Rake::Task["client_prefix:create_index"].invoke
Rake::Task["doi:create_index"].invoke
Rake::Task["client_prefix:create_alias"].invoke

Rake::Task["other_doi:create_index"].invoke
Rake::Task["other_doi:create_alias"].invoke

Rake::Task["datacite_doi:create_index"].invoke
Rake::Task["datacite_doi:create_alias"].invoke

Rake::Task["event:create_index"].invoke
Rake::Task["event:create_alias"].invoke

Rake::Task["activity:create_index"].invoke
end

Expand All @@ -26,6 +43,8 @@ namespace :elasticsearch do
Rake::Task["prefix:delete_index"].invoke
Rake::Task["provider_prefix:delete_index"].invoke
Rake::Task["client_prefix:delete_index"].invoke
Rake::Task["other_doi:delete_index"].invoke
Rake::Task["datacite_doi:delete_index"].invoke
Rake::Task["doi:delete_index"].invoke
Rake::Task["event:delete_index"].invoke
Rake::Task["activity:delete_index"].invoke
Expand Down

0 comments on commit 475b5a0

Please sign in to comment.