cul_hydra 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cul_hydra/indexer.rb +5 -3
- data/lib/cul_hydra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c425738e5a5c4634305f4dd908e2c2448db50cc7194c88743a560fd1b2ee8db8
|
4
|
+
data.tar.gz: 0a69f6de80f11f56812f83ebccd1f0610b4db6e447a8b0c39188449135a830b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c9b87f2e4dc966c221d7b32e8cc4e7389b40d5db802e6feb7b2209127464bfd3ae616cc369abe80606fb84b85384edc7f2a59fb2da587b94f90fe0352489c5
|
7
|
+
data.tar.gz: a09fb529dcb1ff328e20e7d8f67afb020767d0c48d4ef29aef77db38283d3923eb63191e0e4e799338a0f52896f7a67dbd3912b4d2689262dda7bc3a723fef54
|
data/lib/cul_hydra/indexer.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
require "active-fedora"
|
2
|
+
|
1
3
|
module Cul::Hydra::Indexer
|
2
4
|
|
3
5
|
NUM_FEDORA_RETRY_ATTEMPTS = 3
|
4
6
|
DELAY_BETWEEN_FEDORA_RETRY_ATTEMPTS = 5.seconds
|
5
7
|
DEFAULT_INDEX_OPTS = {
|
6
|
-
|
8
|
+
skip_generic_resources: false, verbose_output: false, softcommit: true, reraise: false
|
7
9
|
}.freeze
|
8
10
|
def self.descend_from(pid, pids_to_omit=nil, verbose_output=false)
|
9
11
|
if pid.blank?
|
@@ -83,7 +85,7 @@ module Cul::Hydra::Indexer
|
|
83
85
|
index_opts = DEFAULT_INDEX_OPTS.merge(index_opts)
|
84
86
|
# assign any legacy positional arguments, permitting explicit nils
|
85
87
|
unless args.empty?
|
86
|
-
index_opts[:
|
88
|
+
index_opts[:skip_generic_resources] = args[0] if args.length > 0
|
87
89
|
index_opts[:verbose_output] = args[1] if args.length > 1
|
88
90
|
index_opts[:softcommit] = args[2] if args.length > 2
|
89
91
|
end
|
@@ -99,7 +101,7 @@ module Cul::Hydra::Indexer
|
|
99
101
|
NUM_FEDORA_RETRY_ATTEMPTS.times do |i|
|
100
102
|
begin
|
101
103
|
active_fedora_object = ActiveFedora::Base.find(pid, :cast => true)
|
102
|
-
if skip_generic_resources && active_fedora_object.is_a?(GenericResource)
|
104
|
+
if index_opts[:skip_generic_resources] && active_fedora_object.is_a?(GenericResource)
|
103
105
|
puts 'Object was skipped because GenericResources are being skipped and it is a GenericResource.'
|
104
106
|
else
|
105
107
|
if index_opts[:softcommit]
|
data/lib/cul_hydra/version.rb
CHANGED