fluent-plugin-proxysql-query-log 0.2.2 → 0.3.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b84c786d14583dd24907fbd0f82b7661f368fc97171334ad409e6879ff940a3
|
4
|
+
data.tar.gz: 1a9010ef23e192ddd357fa75f4f84719743dfabe604cae41fc7234557ebbdcd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7657722bcef41d00c82d23948f0f32692237951bd90d2d3f2761bda11cc457f9f986096c374a5efae61d052b4660a39cfc7b124089eb8eff960e2f509ceed576
|
7
|
+
data.tar.gz: 1ba0f00265888db417955e4ceb5d45af2fbb08ce9d2e11589b00964ceaf7e290a086dfb35701d121d544f4eb752b0e6a0a903551ea26c183456ab906d679bf9f
|
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-proxysql-query-log"
|
6
|
-
spec.version = "0.
|
6
|
+
spec.version = "0.3.2"
|
7
7
|
spec.authors = ["r_takaishi"]
|
8
8
|
spec.email = ["ryo.takaishi.0@gmail.com"]
|
9
9
|
|
@@ -63,7 +63,7 @@ module Fluent
|
|
63
63
|
|
64
64
|
def refresh_watchers
|
65
65
|
target_paths = expand_paths
|
66
|
-
|
66
|
+
remove_detached_watcher
|
67
67
|
start_watchers(target_paths)
|
68
68
|
end
|
69
69
|
|
@@ -78,11 +78,8 @@ module Fluent
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
82
|
-
|
83
|
-
w = @watchers.delete(path) if w
|
84
|
-
w.detach if w
|
85
|
-
end
|
81
|
+
def remove_detached_watcher
|
82
|
+
@watchers = @watchers.select { |k, v| v.attached? }
|
86
83
|
end
|
87
84
|
|
88
85
|
private
|
@@ -20,10 +20,12 @@ module Fluent
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def on_change(previous, current)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
if current.nlink == 0
|
24
|
+
@log.debug("stop watch: #{@path} (deleted)")
|
25
|
+
detach
|
26
|
+
else
|
27
|
+
read
|
28
|
+
end
|
27
29
|
end
|
28
30
|
|
29
31
|
def read
|
@@ -71,6 +73,7 @@ module Fluent
|
|
71
73
|
end
|
72
74
|
|
73
75
|
def detach
|
76
|
+
@pos_storage.delete(@path)
|
74
77
|
@attached = false
|
75
78
|
super
|
76
79
|
end
|