fluent-plugin-storage-redis 0.0.1 → 0.0.2

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: 9fb24c52cf1a0511f8edbf5df0c2fcc4494f1a94
4
- data.tar.gz: e6aa5a7a15ec6dfc3ab692a4825d38544c4141b6
3
+ metadata.gz: 074f3f6fa3a1834180b74c48438e385615397632
4
+ data.tar.gz: 76f189408df28edff42ea1f14a380aa1757460db
5
5
  SHA512:
6
- metadata.gz: 2946ec9dcd8734ef7629ab9131ac498e2e7959317da76b75b34895ef67aafa4fbdc1d0a1a7be5873e75d3d5884aa6fdc42e587a7d8749104b4b5c4b49d38e86b
7
- data.tar.gz: b1a7bf3bb01a9406fe4a387e3e74af02dede864c61765752736567d7f805078bd7494aba5e59792f8f917bbd652acf63045d6b7b9fc20c47428620b515b89a1d
6
+ metadata.gz: 105cb3c0a5ae16f0f6cd3c167cb558d5f7faf236ee192b48f22a9fd89ab9d47ac64ef7f90b75db0dc71e435b4f060fba5ce5b8982cca0b7b9ee50e387f428d71
7
+ data.tar.gz: f33f797bd7d3cad95feee2519badbde580a5fc6fa4f71066278b178d9f333a72eb5864360da50195ae4f90e6bbdfca51f15a8c4e2b11d33e55d47304cef265f6
@@ -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-storage-redis"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Hiroshi Hatake"]
9
9
  spec.email = ["cosmo0920.oucc@gmail.com"]
10
10
 
@@ -40,6 +40,17 @@ module Fluent
40
40
  options[:password] = @password if @password
41
41
 
42
42
  @redis = Redis.new(options)
43
+
44
+ object = @redis.get(@path)
45
+ if object
46
+ begin
47
+ data = Yajl::Parser.parse(object)
48
+ raise Fluent::ConfigError, "Invalid contents (not object) in plugin redis storage: '#{@path}'" unless data.is_a?(Hash) unless data.is_a?(Hash)
49
+ rescue => e
50
+ log.error "failed to read data from plugin redis storage", path: @path, error: e
51
+ raise Fluent::ConfigError, "Unexpected error: failed to read data from plugin redis storage: '#{@path}'"
52
+ end
53
+ end
43
54
  end
44
55
 
45
56
  def multi_workers_ready?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-storage-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Hatake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-13 00:00:00.000000000 Z
11
+ date: 2017-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler