index-tanked 0.1.1 → 0.1.2
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.
- data/lib/index-tanked/class_methods.rb +8 -6
- data/lib/index-tanked/version.rb +1 -1
- metadata +3 -3
@@ -14,9 +14,10 @@ module IndexTanked
|
|
14
14
|
def add_to_index_tank(doc_id, data, fallback=true)
|
15
15
|
begin
|
16
16
|
raise IndexTanked::IndexingDisabledError unless IndexTanked::Configuration.index_available?
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
timeout = index_tanked.get_value_from(IndexTanked::Configuration.timeout)
|
18
|
+
if timeout
|
19
|
+
IndexTankedTimer.timeout(timeout, TimeoutExceededError) do
|
20
|
+
sleep(timeout + 1) if $testing_index_tanked_timeout
|
20
21
|
@index_tanked.index.document(doc_id).add(*data)
|
21
22
|
end
|
22
23
|
else
|
@@ -41,9 +42,10 @@ module IndexTanked
|
|
41
42
|
def delete_from_index_tank(doc_id, fallback=true)
|
42
43
|
begin
|
43
44
|
raise IndexTanked::IndexingDisabledError unless IndexTanked::Configuration.index_available?
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
timeout = index_tanked.get_value_from(IndexTanked::Configuration.timeout)
|
46
|
+
if timeout
|
47
|
+
IndexTankedTimer.timeout(timeout, TimeoutExceededError) do
|
48
|
+
sleep(timeout + 1) if $testing_index_tanked_timeout
|
47
49
|
@index_tanked.index.document(doc_id).delete
|
48
50
|
end
|
49
51
|
else
|
data/lib/index-tanked/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index-tanked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Kittelson
|