harvestdor-indexer 0.0.10 → 0.0.11

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGYzNWY3ZWNkM2VlNzdhY2YyN2UxZGQ3NzM2MTQyOTRmYzRiZDVjMw==
4
+ YjA3NGNjNzhkOGQ1NTcxMTEyOWIyNGJkY2NlYTFmNzhhN2U0NGUyZQ==
5
5
  data.tar.gz: !binary |-
6
- YTE4YWFhMWEzOGQ0NDJhMDdlNGRlNGFiNjNiMjE1ZWJlNWMyNzQ2Yg==
6
+ YzU0NzdkMGIyN2I4YjgyOGJmMGMyMDcyZWQyNjNkZjc3M2ZmNmFiYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODdlZDM2MTNkYmYzODNlZmVhY2I0YzJjNGRhMGE3MjMyYzNjNTZiYTJmNDMy
10
- ZWI1ZTUyZjZmNWFlNTY3NGUzZGMzMzVlMDY0MTQxNjRiNzRlM2U0OGI3MzU4
11
- NTZhNWUwMjE2MjNjMDJjODU4MTA3YzVjOGY5NzQzZGNkMGE1ZDM=
9
+ ZmQyZjkwYThhN2MzNGZjZGJmNTU0NjNjN2FiMWI0YTBmZjJlN2M0Y2UwNDU5
10
+ YmQzZGI0MjZkOWM0ZGU4MmY5OGFjZTA5YTE2M2Y0ZjUzOGM5ZmNiMTI2YWFl
11
+ MzUwODUyOTdiMTE5ZmZiYWE5Nzg0MzRkOTRiMGM2ZDYxY2NmZjk=
12
12
  data.tar.gz: !binary |-
13
- MTYyMzMzNDA2OTM5NWU4ZjdlNGQxYzc3ODU5MTBmNjI5MGM0OTM3NjNkZDdm
14
- OWIwY2M1Yjk5OTEyOGIxNGFmYmEwMGNmZDhkZmQ4MmM5MWQxMDAzMmZhMTdl
15
- YmNkODM1MDZmMTI4OThhYmFlYWFlMTc5MzEwYzBlMTIyNzg4Yzk=
13
+ MmE0YTVhMjdjNjQ3YzViNTk4NTI2ZWYzYjU1ZTFjMWYzNTU0NWM3YWRlMmMz
14
+ N2YwMzI4ZDM2NmY1ZGVkYjRmYzczNWE2NDQwYzFkYmJiYmM3Mzk3Nzk1ZjZk
15
+ MTA0ZDA4YTBlZDIzNjQzNjg4ODZkYTcwZjhiMTBiNTg2NzI1ZWM=
@@ -82,14 +82,15 @@ module Harvestdor
82
82
  def solr_add(doc, id, do_retry=true)
83
83
  #if do_retry is false, skip retrying
84
84
  tries=do_retry ? 0 : 999
85
- while tries < @max_retries
85
+ max_tries=@max_retries ? @max_retries : 5 #if @max_retries isn't set, use 5
86
+ while tries < max_tries
86
87
  begin
87
88
  tries+=1
88
89
  solr_client.add(doc)
89
90
  #return if successful
90
91
  return
91
92
  rescue => e
92
- if tries<@max_retries
93
+ if tries<max_tries
93
94
  logger.warn "#{id}: #{e.message}, retrying"
94
95
  else
95
96
  @error_count+=1
@@ -1,6 +1,6 @@
1
1
  module Harvestdor
2
2
  class Indexer
3
3
  # this is the Ruby Gem version
4
- VERSION = "0.0.10"
4
+ VERSION = "0.0.11"
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: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay