slack_log_device 2.1.2 → 2.1.3
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 +4 -4
- data/VERSION +1 -1
- data/lib/slack_log_device.rb +1 -11
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 466a2f36071f7d51ec258e3034890b2bf434367b
|
|
4
|
+
data.tar.gz: fb58589a94ba4f6711775065c747d793b506361e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 467fd9a2582e93b20d8cdf746a99d96dfc3fabfe906a6984ea56048973836ce8719a64852ca3cf6bfeef903103f9de4ac8632f463930ec9ade7946ad7814266a
|
|
7
|
+
data.tar.gz: 91e38b5d3f0666e0d675bde99bb59e6bacac0304f930ad5c0fdd5ea1207485d8fa85525faaeb9f5337e9706ec37c5e631d1d64e1509f0369e1a0d18962211dd8
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.1.
|
|
1
|
+
2.1.3
|
data/lib/slack_log_device.rb
CHANGED
|
@@ -41,7 +41,6 @@ class SlackLogDevice
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def flush
|
|
44
|
-
kill_flush_thread
|
|
45
44
|
return if @buffer.empty?
|
|
46
45
|
message = ''
|
|
47
46
|
@mutex.synchronize do
|
|
@@ -98,7 +97,7 @@ class SlackLogDevice
|
|
|
98
97
|
@mutex.synchronize do
|
|
99
98
|
@buffer << message
|
|
100
99
|
end
|
|
101
|
-
|
|
100
|
+
@flush_thread.kill if @flush_thread
|
|
102
101
|
@flush_thread = Thread.new do
|
|
103
102
|
sleep(flush_delay) unless auto_flush?
|
|
104
103
|
flush
|
|
@@ -106,13 +105,4 @@ class SlackLogDevice
|
|
|
106
105
|
nil
|
|
107
106
|
end
|
|
108
107
|
|
|
109
|
-
private
|
|
110
|
-
|
|
111
|
-
def kill_flush_thread
|
|
112
|
-
if @flush_thread
|
|
113
|
-
@flush_thread.kill
|
|
114
|
-
@flush_thread = nil
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
108
|
end
|