logstash_writer 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash_writer.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 646455172093377861ec1c62178b4aca74473a8a816929ddfb33aafc0df959ef
|
4
|
+
data.tar.gz: dc6b57317bf8881e29606cb1fe784a3dd2e591e331156589cdfc80eb6e562862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8583e8677dc1c238f4030a0a5e3f63b5b75319c17b9d81249f962d9e0b33e828b1bcdd4eaebd5a2104082d014bd7abf7c5332751efa2985bc4105b4ad86dd743
|
7
|
+
data.tar.gz: a99a3f8b3a0cc10033f110f9e047d30cc0d0a630cca536d36cb5502a1b3461c04721cc6ef063edd2da85ea7276f8b4b57c591b112b97f530d5f874d7bd1c8c82
|
data/lib/logstash_writer.rb
CHANGED
@@ -94,7 +94,9 @@ class LogstashWriter
|
|
94
94
|
|
95
95
|
metrics_registry.gauge(:"#{metrics_prefix}_queue_max", "The maximum size of the event queue").set({}, backlog)
|
96
96
|
|
97
|
-
|
97
|
+
# We can't use a stdlib Queue object because we need to re-push items
|
98
|
+
# onto the front of the queue in case of error
|
99
|
+
@queue = []
|
98
100
|
@queue_mutex = Mutex.new
|
99
101
|
@queue_cv = ConditionVariable.new
|
100
102
|
|
@@ -144,12 +146,10 @@ class LogstashWriter
|
|
144
146
|
def run
|
145
147
|
@worker_mutex.synchronize do
|
146
148
|
if @worker_thread.nil?
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
# Don't return until the thread has *actually* started
|
152
|
-
m.synchronize { cv.wait(m) }
|
149
|
+
@worker_thread = Thread.new do
|
150
|
+
Thread.current.name = "LogstashWriter"
|
151
|
+
write_loop
|
152
|
+
end
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash_writer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prometheus-client
|