Sha256: f71a0309718ad5953361bbc1f1180005de604a707ade3cb2e8d7952f12050cdc

Contents?: true

Size: 852 Bytes

Versions: 16

Compression:

Stored size: 852 Bytes

Contents

namespace :cul_scv_hydra do

  namespace :index do

    task :recursive => :environment do

      puts '---------------------------'
      puts 'Fedora URL: ' + ActiveFedora.config.credentials[:url]
      puts 'Solr URL: ' + ActiveFedora.solr_config[:url]
      puts '---------------------------'

      START_TIME = Time.now

      ENV["RAILS_ENV"] ||= Rails.env
      pid = ENV['pid']
      if ENV['omit']
        pids_to_omit = ENV['omit'].split(',').map{|pid|pid.strip}
      else
        pids_to_omit = nil
      end

      skip_generic_resources = true if ENV['skip_generic_resources'] == 'true'

      begin
        Cul::Scv::Hydra::Indexer.recursively_index_fedora_objects(pid, pids_to_omit, skip_generic_resources, true)
      rescue => e
        puts 'Error: ' + e.message
        puts e.backtrace
        next
      end

    end

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cul_scv_hydra-0.19.1 lib/tasks/index.rake
cul_scv_hydra-0.19.0 lib/tasks/index.rake
cul_scv_hydra-0.18.5 lib/tasks/index.rake
cul_scv_hydra-0.18.4 lib/tasks/index.rake
cul_scv_hydra-0.18.3 lib/tasks/index.rake
cul_scv_hydra-0.18.2 lib/tasks/index.rake
cul_scv_hydra-0.18.1 lib/tasks/index.rake
cul_scv_hydra-0.18.0 lib/tasks/index.rake
cul_scv_hydra-0.17.2 lib/tasks/index.rake
cul_scv_hydra-0.17.1 lib/tasks/index.rake
cul_scv_hydra-0.17.0 lib/tasks/index.rake
cul_scv_hydra-0.16.12 lib/tasks/index.rake
cul_scv_hydra-0.16.11 lib/tasks/index.rake
cul_scv_hydra-0.16.10 lib/tasks/index.rake
cul_scv_hydra-0.16.8 lib/tasks/index.rake
cul_scv_hydra-0.16.7 lib/tasks/index.rake