diff --git a/lib/tasks/client_prefix.rake b/lib/tasks/client_prefix.rake index 679b6a185..e17bbd26c 100644 --- a/lib/tasks/client_prefix.rake +++ b/lib/tasks/client_prefix.rake @@ -48,7 +48,7 @@ namespace :client_prefix do desc 'Import all client_prefixes' task :import => :environment do - ClientPrefix.import(index: ClientPrefix.inactive_index) + ClientPrefix.import(index: ENV["INDEX"] || ClientPrefix.inactive_index, batch_size: (ENV["BATCH_SIZE"] || 100).to_i) end desc 'Generate uid' diff --git a/lib/tasks/prefix.rake b/lib/tasks/prefix.rake index 855173efa..060b6aa95 100644 --- a/lib/tasks/prefix.rake +++ b/lib/tasks/prefix.rake @@ -48,7 +48,7 @@ namespace :prefix do desc 'Import all prefixes' task :import => :environment do - Prefix.import(index: Prefix.inactive_index) + Prefix.import(index: ENV["INDEX"] || Prefix.inactive_index, batch_size: (ENV["BATCH_SIZE"] || 100).to_i) end desc 'Delete prefix and associated DOIs' diff --git a/lib/tasks/provider_prefix.rake b/lib/tasks/provider_prefix.rake index d04028c07..14bfcadf8 100644 --- a/lib/tasks/provider_prefix.rake +++ b/lib/tasks/provider_prefix.rake @@ -48,7 +48,7 @@ namespace :provider_prefix do desc 'Import all provider_prefixes' task :import => :environment do - ProviderPrefix.import(index: ProviderPrefix.inactive_index) + ProviderPrefix.import(index: ENV["INDEX"] || ProviderPrefix.inactive_index, batch_size: (ENV["BATCH_SIZE"] || 100).to_i) end desc 'Generate uid'