fluent-plugin-resque_stat 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-resque_stat"
7
- gem.version = "0.0.4"
7
+ gem.version = "0.0.5"
8
8
  gem.authors = ["Spring_MT"]
9
9
  gem.email = ["today.is.sky.blue.sky@gmail.com"]
10
10
  gem.summary = %q{Fluent input plugin for Resque info}
@@ -7,16 +7,13 @@ module Fluent
7
7
  require 'resque'
8
8
  end
9
9
 
10
- config_param :tag, :string, :default => nil
10
+ config_param :tag, :string
11
11
  config_param :host, :string, :default => '127.0.0.1'
12
12
  config_param :port, :integer, :default => 6379
13
13
  config_param :run_interval, :time, :default => 60
14
14
 
15
15
  def configure(conf)
16
16
  super
17
- if !@tag
18
- raise ConfigError, "'tag' option is required on exec input"
19
- end
20
17
  Resque.redis = "#{@host}:#{@port}"
21
18
  end
22
19
 
@@ -43,12 +40,9 @@ module Fluent
43
40
  resque_stat = Resque.info
44
41
  record = {}
45
42
  resque_stat.each { |key, value| record[key.to_s] = value }
46
- tag = @tag
47
- if tag
48
- Engine.emit(tag, Engine.now, record)
49
- end
43
+ Engine.emit(@tag, Engine.now, record)
50
44
  rescue => e
51
- $log.error "exec failed to emit", :error=>$!.to_s, :line => e.message
45
+ $log.error "rescue_stat failed to emit", :error => $!.to_s, :line => e.message
52
46
  $log.warn_backtrace $!.backtrace
53
47
  end
54
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-resque_stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: