From d7dd846186237db7cb97c5aefabe83bc03dde2f2 Mon Sep 17 00:00:00 2001 From: kjgarza Date: Tue, 6 Jul 2021 15:30:26 +0200 Subject: [PATCH] fix rake tasks for latests migrations changes --- db/seeds/development/base.seeds.rb | 2 +- lib/tasks/elasticsearch.rake | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/db/seeds/development/base.seeds.rb b/db/seeds/development/base.seeds.rb index fa545f939..b50cc1fd5 100644 --- a/db/seeds/development/base.seeds.rb +++ b/db/seeds/development/base.seeds.rb @@ -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") diff --git a/lib/tasks/elasticsearch.rake b/lib/tasks/elasticsearch.rake index d8cfda6ef..1ac8ec86f 100644 --- a/lib/tasks/elasticsearch.rake +++ b/lib/tasks/elasticsearch.rake @@ -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 @@ -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