harvestdor-indexer 2.3.0 → 2.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d96e29c5f341999505f85ed425337dd44ca1046b
4
- data.tar.gz: 08fb83487024f6aede8af03146a5f1bc37cdb963
3
+ metadata.gz: aaba4e6dc5856b407d053a43875f26dd9f76bf47
4
+ data.tar.gz: bce6c1c859e20d63e8c7503c49ca7a0f86668f5c
5
5
  SHA512:
6
- metadata.gz: e534e9836695329596135b256524bfcb1a774add00c81e4e6d6a17f4c08f127df671f43066616265d237fddeaf147b9992a9822cf8f166c03b255222fb6ece46
7
- data.tar.gz: 4365f67d19849eb939c5abf91d77870ad5cc01b2fea6012b729ee9eb09b6a44ef94dc1ae04cebff9badeb1004a1f27d5e302d9e9d70d6a296c1cfb4b45ce508f
6
+ metadata.gz: faed68b259bd191dee7d54d407a9c0aca9326999bb02b4b34ce035f05ce01a0a2ed9ed35a9b3135824f311d815d6ff158d2f8f5111d2c2db62b33ffed07b11b0
7
+ data.tar.gz: 1ca560db599096a21e9346404fd00544a2ed35bdb7684c9318f6d4a5e60c10e4b82124ce6edad8346471b5f8903ed73e6fbcd2c6c6926a16de7c30bea3416b48
@@ -20,7 +20,9 @@ module Harvestdor
20
20
  # Add the document to solr, retry if an error occurs.
21
21
  # See https://github.com/ooyala/retries for docs on with_retries.
22
22
  # @param [Hash] doc a Hash representation of the solr document
23
- def add(doc)
23
+ # @param [String] coll_size the size of the collection
24
+ # @param [String] index the index of this document (nth to be indexed)
25
+ def add(doc, coll_size = '?', index = '?')
24
26
  id = doc[:id]
25
27
 
26
28
  handler = proc do |exception, attempt_number, _total_delay|
@@ -31,7 +33,7 @@ module Harvestdor
31
33
  with_retries(max_tries: config.max_retries, handler: handler, base_sleep_seconds: 1, max_sleep_seconds: 5) do |attempt|
32
34
  logger.debug "Attempt #{attempt} for #{id}"
33
35
  client.add(doc)
34
- logger.info "Successfully indexed #{id} on attempt #{attempt}"
36
+ logger.info "Successfully indexed #{id} (#{index}/#{coll_size}) on attempt #{attempt}"
35
37
  end
36
38
  end
37
39
  end
@@ -1,6 +1,6 @@
1
1
  module Harvestdor
2
2
  class Indexer
3
3
  # this is the Ruby Gem version
4
- VERSION = '2.3.0'
4
+ VERSION = '2.3.1'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harvestdor-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-10 00:00:00.000000000 Z
13
+ date: 2015-12-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr