puppetdb_query 0.0.5 → 0.0.6

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: fc5ffd8e14e1d52cd2ba1709657cacfc0e4f4587
4
- data.tar.gz: 971dc5b43bd77ddf56aa29147e9a1c39d9fae961
3
+ metadata.gz: 8fa2048576d21df343ea568b1c52851d45e967de
4
+ data.tar.gz: 7bb2731ef4c718a00c9c485ad5383a3e480a4f59
5
5
  SHA512:
6
- metadata.gz: e44f81a09dbccdcc4d52df43410b7eba1417462bc677fb2e0c4710f504556acbcd215f4d4c9aac5d3f89ef81966c0d2b00ba5a270e17fce2e0b8acc5997ee481
7
- data.tar.gz: 4c9435bb7fd94357c68ab8d1b7728a1e8a32da7f09f8dc8b3733b2450a391464aac53574514afef0a34cd25dfb22d2e888d9cc7c0987b08515d532a485cdb3fe
6
+ metadata.gz: 38290e90316fb047076863bd8d44f601cb8c3d65b7a4277a5c13efe4b3767fc5e36c4885b24a277f48fdb082970fbcd704326360db141b021600f7d6a4507cf0
7
+ data.tar.gz: 74a70703c7c9c0ebeec8d246dab7868a82b65839512290787b0a11f11b9de690124209882b4eff0c3c998dc846836ae2aab8468d1d10fd6bbbbe62334c89b5ed
data/README.md CHANGED
@@ -24,7 +24,7 @@ gem 'mongo', '>=2.2.0'
24
24
 
25
25
  and then execute:
26
26
 
27
- $ bundle
27
+ $ bundle install
28
28
 
29
29
  Or install it yourself as:
30
30
 
@@ -37,6 +37,12 @@ module PuppetDBQuery
37
37
  { :$and => terms }
38
38
  when :or
39
39
  { :$or => terms }
40
+ when :not
41
+ # $not currently (<=2.5.1) only supports negating equality operators.
42
+ # so you can do { field: { $not : { [$eq,$gt,$lt,...] } }
43
+ # but there is no way to negate an entire expression.
44
+ # see https://jira.mongodb.org/browse/SERVER-10708
45
+ { :$nor => terms }
40
46
  when :equal
41
47
  { term.args[0] => term.args[1].to_s }
42
48
  when :not_equal
@@ -16,7 +16,7 @@ module PuppetDBQuery
16
16
  # update by deleting missing nodes and iterating over all nodes and
17
17
  # update or insert facts for each one
18
18
  #
19
- # 335.6 seconds: update time for 1561 nodes
19
+ # mongo: 1598 nodes in 63.46 seconds
20
20
  def update1
21
21
  logger.info "update1 started (full update)"
22
22
  tsb = Time.now
@@ -40,7 +40,7 @@ module PuppetDBQuery
40
40
  # update by deleting missing nodes and get a complete map of nodes with facts
41
41
  # and update or insert facts for each one
42
42
  #
43
- # 166.4 seconds: update time for 1561 nodes
43
+ # mongo: 1597 nodes in 35.31 seconds
44
44
  def update2
45
45
  logger.info "update2 started (full update)"
46
46
  tsb = Time.now
@@ -65,7 +65,7 @@ module PuppetDBQuery
65
65
  # update by deleting missing nodes and getting a list of nodes
66
66
  # with changed facts, iterate over them and update or insert facts for each one
67
67
  #
68
- # update time depends extremly on the number of changed nodes
68
+ # mongo: 56 nodes in 2.62 seconds
69
69
  def update3(last_update_timestamp)
70
70
  logger.info "update3 started (incremental)"
71
71
  tsb = Time.now
@@ -87,6 +87,9 @@ module PuppetDBQuery
87
87
  destination.meta_fact_update("update3", tsb, tse) unless errors
88
88
  end
89
89
 
90
+ # update node update information
91
+ #
92
+ # mongo: 1602 nodes in 0.42 seconds
90
93
  def update_node_properties
91
94
  logger.info "update_node_properties started"
92
95
  tsb = Time.now
@@ -1,3 +1,3 @@
1
1
  module PuppetDBQuery
2
- VERSION = "0.0.5".freeze
2
+ VERSION = "0.0.6".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetdb_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Meyling
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake