fluent-plugin-chef-api 0.3.0 → 0.3.1

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: ed998fcc5dee1671058a5b3cf846a8695ccb84ba
4
- data.tar.gz: 4483d34b1774c20ce7fdd275237670d040ecb2c2
3
+ metadata.gz: a5a437bfdffbd90640638b24f56dc50fe53b0556
4
+ data.tar.gz: 264b5c9139895281e37b8e7721c6865725ed2ced
5
5
  SHA512:
6
- metadata.gz: 665fb3a320bb653f6c91ad9c2afe69d5ac90da92f0dd938df15c27bca0a6eb95aaecad1e01e08825a35202566928726d76ac3bd3ea7245a950cd54bec176332d
7
- data.tar.gz: c7be0994d88923faa353d323e168d66eceb0165a2f3a7b53491957be7f586c425ef34a73d13fff9b5d2fd854ee4d21032176d18dd7ca290e32a9f9d3ad04ffa2
6
+ metadata.gz: 4b3a869de40548d45a36b1e920a8073748766ca1d54448aeafc9c14d9cc9d9e1f1384877e06ecc4a9a6ef6c78ea264cd824c9e3305304ad73dd25d96d4232d51
7
+ data.tar.gz: 751a8e26cf95900c18a28a76133c37dad594f2d4da5638a9c616f49efb7c204474f38adf8065ae6d7087dc1b61c4af21aa5066bdf0559afde0f0ed3cb2476288
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-chef-api"
7
- spec.version = "0.3.0"
7
+ spec.version = "0.3.1"
8
8
  spec.authors = ["Yamashita Yuu"]
9
9
  spec.email = ["peek824545201@gmail.com"]
10
10
  spec.license = "Apache-2.0"
@@ -107,6 +107,15 @@ module Fluent
107
107
  nodes = connection.nodes
108
108
  end
109
109
  Engine.emit("#{@tag}.nodes", Engine.now, data.merge({"value" => nodes.count}))
110
+ begin
111
+ nodes.instance_eval do
112
+ if Hash === @collection
113
+ @collection = Hash[@collection.to_a.shuffle]
114
+ end
115
+ end
116
+ rescue => error
117
+ $log.warn("failed to shuffle nodes: #{error.class}: #{error.message}")
118
+ end
110
119
  nodes.each do |node|
111
120
  begin
112
121
  Engine.emit("#{@tag}.run_list", Engine.now, data.merge({"value" => node.run_list.length, "node" => node.name}))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-chef-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yamashita Yuu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-04 00:00:00.000000000 Z
11
+ date: 2015-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler