logjam_agent 0.29.5 → 0.29.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/version.rb +1 -1
- data/lib/logjam_agent/zmq_forwarder.rb +8 -1
- 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: ca8c03f4f1a6b89ca5fc1b9f89b6ac6141cead9b65b78918494eacc40b34205b
|
4
|
+
data.tar.gz: 9f962e7fe7d2d379aa9f2b2889876ab79f9ea3542a0a15d3c2e1d072eda50f4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24b3f4c90acadac0659a2e38ab07bc351def08d21fe568da8cb6140955a39fce03784006d01cd9899652de163597e7e4ec766ec6f5c65c1cfd7d77e1d7aa03e1
|
7
|
+
data.tar.gz: 3aaac4d51b15ec0f2c96784e821092b091b55c857da6a682c402d2315659863ec81f59acd769d3b4b64d450d07999edbdad83761b00585d4376ec57f4ec30489
|
data/lib/logjam_agent/version.rb
CHANGED
@@ -15,7 +15,7 @@ module LogjamAgent
|
|
15
15
|
@config[:host] = "localhost" if @config[:host].blank?
|
16
16
|
@sequence = SEQUENCE_START
|
17
17
|
@socket = nil
|
18
|
-
|
18
|
+
@ping_ensured = false
|
19
19
|
end
|
20
20
|
|
21
21
|
def connection_specs
|
@@ -53,6 +53,7 @@ module LogjamAgent
|
|
53
53
|
def socket
|
54
54
|
return @socket if @socket
|
55
55
|
@socket = self.class.context.socket(ZMQ::DEALER)
|
56
|
+
ensure_ping_at_exit
|
56
57
|
@socket.setsockopt(ZMQ::LINGER, @config[:linger])
|
57
58
|
@socket.setsockopt(ZMQ::SNDHWM, @config[:snd_hwm])
|
58
59
|
@socket.setsockopt(ZMQ::RCVHWM, @config[:rcv_hwm])
|
@@ -70,6 +71,12 @@ module LogjamAgent
|
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
74
|
+
def ensure_ping_at_exit
|
75
|
+
return if @ping_ensured
|
76
|
+
at_exit { ping; reset }
|
77
|
+
@ping_ensured = true
|
78
|
+
end
|
79
|
+
|
73
80
|
def forward(data, options={})
|
74
81
|
app_env = options[:app_env] || @app_env
|
75
82
|
key = options[:routing_key] || "logs.#{app_env.sub('-','.')}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.29.
|
4
|
+
version: 0.29.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|