elasticsearch-model-extensions 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0f78172ce35c1b446d6893e48dfb62a8483c2f0
|
4
|
+
data.tar.gz: 4ccd0c9871b9065fdee06cdd4f32c82b9e6d0825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b39a2c10cb9fa7f87818d018912354423fe72bb071080f820b63898a27ce0368cbf9308e35356dff3a0699169158d8ef0fd32181f18a90353f72445b80913ef5
|
7
|
+
data.tar.gz: ce75230625c47a6122d25ebf2b0d47c83c3e67a5fb7dd354a1ab646ecaee80bc922ae3dfd2404929e20b3808fbcd5678fa54df81395212f0236d804e07521b97
|
@@ -33,7 +33,12 @@ module Elasticsearch
|
|
33
33
|
begin
|
34
34
|
find_record_or_raise
|
35
35
|
rescue ActiveRecord::RecordNotFound => e
|
36
|
-
|
36
|
+
message = "#{self.class.name}: #{e.to_s}"
|
37
|
+
if defined? ::Rails.logger.info
|
38
|
+
::Rails.logger.info message
|
39
|
+
else
|
40
|
+
warn message
|
41
|
+
end
|
37
42
|
nil
|
38
43
|
end
|
39
44
|
end
|
data/spec/batch_updating_spec.rb
CHANGED
@@ -99,9 +99,13 @@ RSpec.describe Elasticsearch::Model::Extensions::BatchUpdating do
|
|
99
99
|
|
100
100
|
describe '.update_index_in_parallel' do
|
101
101
|
subject {
|
102
|
-
Article.update_index_in_parallel(parallelism:
|
102
|
+
Article.update_index_in_parallel(parallelism: 1)
|
103
103
|
}
|
104
104
|
|
105
|
+
before(:each) do
|
106
|
+
expect(Parallel).to receive(:each).with([0..3], in_processes: 1).and_yield(1..3).once
|
107
|
+
end
|
108
|
+
|
105
109
|
it_behaves_like 'indexing all articles'
|
106
110
|
end
|
107
111
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-model-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke KUOKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|