fluent-plugin-rds-log 0.3.1 → 0.3.2

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: 100e761ba4bf2026359c5f82740808b063c8a326
4
- data.tar.gz: d262031aba300c0c1d83b0bbe277b36e76ad8d91
3
+ metadata.gz: 7234d909e1747af7e9c70583a9f0cf5182e7b3dd
4
+ data.tar.gz: 5cf06bf9314bf72670ad679fce20b40195d227bd
5
5
  SHA512:
6
- metadata.gz: da8d43d78575d074a82b0d519cf12c89d861a5cbc769aca5971c7a1315ea1e33b68b5ce85bfe1b12de83dbfe1683d0ac970dd302bacea9b6a37d80b80b2f28ee
7
- data.tar.gz: 1e56100f1d83482270327ffcb12556fc4777fa40c3891a099a1bedb57682f5e8df5bd099aa89e39dbe84dafd78ed0bcfa646045a94b4259beb8cbcbd73d2a03f
6
+ metadata.gz: 52f9abf1383c0fa05d39745b8fe937e7dc0b34fce2a254c3dfcd855521fc3b3bf229e443506fdba94cc8835714fa71b6b5bf0ca9ae170831dfaa0bb218b86b24
7
+ data.tar.gz: 93765c920c94c1741d01c57256acb736834fa359890fc62a84901f2033aa1ee4ff25e647b70b901c410c0f23df33f38b9206a976bcd360450104a0a0fefac919
@@ -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-rds-log"
7
- gem.version = "0.3.1"
7
+ gem.version = "0.3.2"
8
8
  gem.authors = ["shinsaka"]
9
9
  gem.email = ["shinx1265@gmail.com"]
10
10
  gem.description = "Amazon RDS slow_log and general_log input plugin for Fluent event collector"
@@ -4,10 +4,7 @@ require 'mysql2'
4
4
  class Fluent::Plugin::Rds_LogInput < Fluent::Plugin::Input
5
5
  Fluent::Plugin.register_input("rds_log", self)
6
6
 
7
- # Define `router` method to support v0.10.57 or earlier
8
- unless method_defined?(:router)
9
- define_method("router") { Fluent::Engine }
10
- end
7
+ helpers :timer
11
8
 
12
9
  config_param :tag, :string
13
10
  config_param :host, :string, :default => nil
@@ -33,13 +30,11 @@ class Fluent::Plugin::Rds_LogInput < Fluent::Plugin::Input
33
30
 
34
31
  def start
35
32
  super
36
- @watcher = Thread.new(&method(:watch))
33
+ timer_execute(:in_rds_log_timer, @refresh_interval, &method(:watch))
37
34
  end
38
35
 
39
36
  def shutdown
40
37
  super
41
- @watcher.terminate
42
- @watcher.join
43
38
  end
44
39
 
45
40
  private
@@ -62,11 +57,8 @@ class Fluent::Plugin::Rds_LogInput < Fluent::Plugin::Input
62
57
  end
63
58
 
64
59
  def watch
65
- while true
66
- @host.split(',').each do |host|
67
- output(host)
68
- end
69
- sleep @refresh_interval
60
+ @host.split(',').each do |host|
61
+ output(host)
70
62
  end
71
63
  end
72
64
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-rds-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - shinsaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-01 00:00:00.000000000 Z
11
+ date: 2018-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd