af_elastic 1.1.0 → 1.1.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 +4 -4
- data/lib/af_elastic.rb +4 -5
- data/lib/af_elastic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b769c2f7953a5708eb342ce3956df980b6de344
|
|
4
|
+
data.tar.gz: e1bfae5ba4e3b1c02aa18c31d57df702b2ab507d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03f7a559a8b8eed3645838c7ace73f4a8c654190bf47523253f5941fe5ab6837e91127706779118a8d36e6e9ec56d3c1fb494fb982ada3e0d4ee86e1ee0154e4
|
|
7
|
+
data.tar.gz: 0255295e1a48a42e81c9e69fd8c5e3d0b96d6bdc2285fa5d299126873b7bf105902d9f75f63c23f6448b2858e64e2103657b54b1eb944da075693c5a9c1d04c6
|
data/lib/af_elastic.rb
CHANGED
|
@@ -58,7 +58,6 @@ module AfElastic
|
|
|
58
58
|
begin
|
|
59
59
|
@types ||= Set.new
|
|
60
60
|
unless @types.include? type
|
|
61
|
-
puts "new type encountered"
|
|
62
61
|
# check mapping through network
|
|
63
62
|
unless AfElastic.configuration.es.indices.exists_type? index: AfElastic.configuration.index, type: type
|
|
64
63
|
dynamic = [{:simple_def=>{:match=>"*",:match_mapping_type=> "string",:mapping=> {:type=> "string",:index=> "not_analyzed"}}}]
|
|
@@ -78,7 +77,7 @@ module AfElastic
|
|
|
78
77
|
@events << {index: {_index: AfElastic.configuration.index, _type: type, data: data}}
|
|
79
78
|
rescue Exception => e
|
|
80
79
|
puts e
|
|
81
|
-
|
|
80
|
+
Rails.logger.error("AfElastic::EventReporter::add_event: something wrong with elasticsearch")
|
|
82
81
|
end
|
|
83
82
|
end
|
|
84
83
|
end
|
|
@@ -91,14 +90,14 @@ module AfElastic
|
|
|
91
90
|
events_to_report = AfElastic::EventStore.events || []
|
|
92
91
|
return if events_to_report.length < AfElastic.configuration.capacity
|
|
93
92
|
AfElastic::EventStore.events = []
|
|
94
|
-
puts "about to bulk"
|
|
93
|
+
# puts "about to bulk"
|
|
95
94
|
|
|
96
95
|
th = Thread.new do
|
|
97
96
|
begin
|
|
98
97
|
AfElastic.configuration.es.bulk body: events_to_report
|
|
99
|
-
puts "bulk suceeded"
|
|
98
|
+
# puts "bulk suceeded"
|
|
100
99
|
rescue Exception => e
|
|
101
|
-
puts "error bulk"
|
|
100
|
+
# puts "error bulk"
|
|
102
101
|
Rails.logger.error("AfElastic::EventReporter::report_events: error doing bulk inserting")
|
|
103
102
|
end
|
|
104
103
|
end
|
data/lib/af_elastic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: af_elastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Appfolio
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: elasticsearch
|