dor-services 5.14.1 → 5.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/services/indexing_service.rb +17 -3
- data/lib/dor/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be30d76033b050011082caadf9ec5a3da75e412f
|
4
|
+
data.tar.gz: 6778987396c62b992630663176f239f68bec053a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f641683e2dbcbe2fda8bb56a8102907795445b0be294ef5340671154b46db9954c342aad32b559e0e32631516ef9d9325c025d3393482a34056505f340dc9b7
|
7
|
+
data.tar.gz: 052a81775ef955913deca327821321e6abbb215894e6420fcc0e05440e12775c454d48eefffe171abdd3839148dedb71fe6f67591af72e6096723927cd971b62
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
|
1
3
|
module Dor
|
2
4
|
class IndexingService
|
3
5
|
##
|
@@ -55,9 +57,21 @@ module Dor
|
|
55
57
|
should_raise_errors = options.fetch(:raise_errors, true)
|
56
58
|
end
|
57
59
|
|
58
|
-
obj =
|
59
|
-
solr_doc =
|
60
|
-
|
60
|
+
obj = nil
|
61
|
+
solr_doc = nil
|
62
|
+
|
63
|
+
# benchmark how long it takes to load the object
|
64
|
+
load_stats = Benchmark.measure('load_instance') do
|
65
|
+
obj = Dor.load_instance pid
|
66
|
+
end.format('%n realtime %rs total CPU %ts').gsub(/[\(\)]/, '')
|
67
|
+
|
68
|
+
# benchmark how long it takes to convert the object to a Solr document
|
69
|
+
to_solr_stats = Benchmark.measure('to_solr') do
|
70
|
+
solr_doc = reindex_object obj, options
|
71
|
+
end.format('%n realtime %rs total CPU %ts').gsub(/[\(\)]/, '')
|
72
|
+
|
73
|
+
index_logger.info "successfully updated index for #{pid} (metrics: #{load_stats}; #{to_solr_stats})"
|
74
|
+
|
61
75
|
solr_doc
|
62
76
|
rescue StandardError => se
|
63
77
|
if se.is_a? ActiveFedora::ObjectNotFoundError
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.14.
|
4
|
+
version: 5.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -682,8 +682,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
682
682
|
version: 1.3.6
|
683
683
|
requirements: []
|
684
684
|
rubyforge_project:
|
685
|
-
rubygems_version: 2.
|
685
|
+
rubygems_version: 2.6.7
|
686
686
|
signing_key:
|
687
687
|
specification_version: 4
|
688
688
|
summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
|
689
689
|
test_files: []
|
690
|
+
has_rdoc:
|