logstash-input-mongoprofile 0.1.6 → 0.1.7

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 751c14fd2f1d734c2bdcdb8b9cb881066e1221d8
4
- data.tar.gz: fe43b0cd3cfa762e46ec341a4482a6a9f743cf11
3
+ metadata.gz: 6e85c56eb301aa6347d92f1afb5709f256f9b208
4
+ data.tar.gz: 1a421cbbbfb5ade2019bdf01fbea4f885777005e
5
5
  SHA512:
6
- metadata.gz: c44fb1215ff9afc52f878a3d7e6df621e2a754edbfd9f7031fed2aa3c73517ecf6cdaf83e4365fd2d459473728010a75875362f2797c5f3ee01c2ac320e48fb5
7
- data.tar.gz: 18ad233a52748b60294395e2f46a34221fdf747a135b537abfc061887635e3b33954ef9ba2964eeebc5fa85b73d15dbf73bf63bf77fb64055d6d3aa37a76c640
6
+ metadata.gz: 2beb086fb1ad2f2fe3ea6f99988ada00b2e6cb0674477d02612f5d3255a14fa4be7df7314488fe66c07f8ffa45a0ffafa996a9c9c944b218b04129924f31061a
7
+ data.tar.gz: 7eeeef25d2164fa94a8da609437cc59e88d14dca0d21716c6831e255f29001f9a74fdf68ec935a91e6c0cd5367a76f467d8d18b0c7e07781eb7f36ea6c5e696d
@@ -100,7 +100,11 @@ class ProfileCollection
100
100
  end
101
101
 
102
102
  def get_last_document_date
103
- @documents[-1]['ts']
103
+ if @documents != nil
104
+ @documents[-1]['ts']
105
+ else
106
+ nil
107
+ end
104
108
  end
105
109
 
106
110
  private
@@ -167,7 +171,11 @@ class Controller
167
171
 
168
172
  profile_collection = ProfileCollection.new(documents, @document_parser)
169
173
 
170
- @last_value_store.save_last_value(profile_collection.get_last_document_date)
174
+ if profile_collection.get_last_document_date != nil
175
+ @last_value_store.save_last_value(profile_collection.get_last_document_date)
176
+ end
177
+ @logger.info('Nothing to get...')
178
+ else
171
179
 
172
180
  profile_collection
173
181
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-mongoprofile'
3
- s.version = '0.1.6'
3
+ s.version = '0.1.7'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'MongoDB system.profile input plugin'
6
6
  s.description = 'MongoDB system.profile input plugin'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-mongoprofile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Antonov