Skip to content

Commit

Permalink
support import options in prefix rake tasks. #389
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 23, 2020
1 parent 3fb3357 commit 1d961e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/client_prefix.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/prefix.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/provider_prefix.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1d961e7

Please sign in to comment.