lib/tasks/index.rake in cul_hydra-1.9.2 vs lib/tasks/index.rake in cul_hydra-1.9.3
- old
+ new
@@ -89,14 +89,15 @@
###########################################
pool = Thread.pool(thread_pool_size)
mutex = Mutex.new
+ index_opts = { skip_generic_resources: skip_generic_resources, verbose_output: false }
pids.each do |pid|
pool.process {
- Cul::Hydra::Indexer.index_pid(pid, skip_generic_resources, false)
+ Cul::Hydra::Indexer.index_pid(pid, index_opts)
mutex.synchronize do
counter += 1
puts "Indexed #{counter} of #{total} | #{Time.now - start_time} seconds"
end
@@ -122,19 +123,20 @@
else
puts 'Please specify a publish target PID (e.g. PID=cul:123)'
next
end
- skip_generic_resources = (ENV['skip_generic_resources'] == 'true')
+ index_opts = { verbose_output: false }
+ index_opts[:skip_generic_resources] = (ENV['skip_generic_resources'] == 'true')
start_time = Time.now
pids = Cul::Hydra::RisearchMembers.get_publish_target_member_pids(publish_target_pid, true)
total = pids.length
puts "Found #{total} publish target members."
counter = 0
pids.each do |pid|
- Cul::Hydra::Indexer.index_pid(pid, skip_generic_resources, false)
+ Cul::Hydra::Indexer.index_pid(pid, index_opts)
counter += 1
puts "Indexed #{counter} of #{total} | #{Time.now - start_time} seconds"
end
end
\ No newline at end of file