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 +8 -8
- data/lib/harvestdor-indexer.rb +3 -2
- data/lib/harvestdor-indexer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjA3NGNjNzhkOGQ1NTcxMTEyOWIyNGJkY2NlYTFmNzhhN2U0NGUyZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzU0NzdkMGIyN2I4YjgyOGJmMGMyMDcyZWQyNjNkZjc3M2ZmNmFiYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmQyZjkwYThhN2MzNGZjZGJmNTU0NjNjN2FiMWI0YTBmZjJlN2M0Y2UwNDU5
|
10
|
+
YmQzZGI0MjZkOWM0ZGU4MmY5OGFjZTA5YTE2M2Y0ZjUzOGM5ZmNiMTI2YWFl
|
11
|
+
MzUwODUyOTdiMTE5ZmZiYWE5Nzg0MzRkOTRiMGM2ZDYxY2NmZjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmE0YTVhMjdjNjQ3YzViNTk4NTI2ZWYzYjU1ZTFjMWYzNTU0NWM3YWRlMmMz
|
14
|
+
N2YwMzI4ZDM2NmY1ZGVkYjRmYzczNWE2NDQwYzFkYmJiYmM3Mzk3Nzk1ZjZk
|
15
|
+
MTA0ZDA4YTBlZDIzNjQzNjg4ODZkYTcwZjhiMTBiNTg2NzI1ZWM=
|
data/lib/harvestdor-indexer.rb
CHANGED
@@ -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
|
-
|
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
|
93
|
+
if tries<max_tries
|
93
94
|
logger.warn "#{id}: #{e.message}, retrying"
|
94
95
|
else
|
95
96
|
@error_count+=1
|