logjam_agent 0.19.2 → 0.19.3
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 -5
- 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: 1634e5c22844025d52a1a2e26e95ed219cc935b5
|
4
|
+
data.tar.gz: 9612717c779312008965b7401e7f13f241b7c710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9abd9d795fa18d84f0baa1142967922e44f130cf607ac4b63f23ccd2e81c570455d5e40b21d98ffa54b396ba44a6baddf2d803f24cea4dab9eb2128da192a90
|
7
|
+
data.tar.gz: 1d6d570cfc85e36356cf8b62ef94be560e6319aea29d00ea947641e0ea5829f50aebdd6a0e530deee296a08d165a54b335aee32078aa4578a536f18007b7e737
|
data/lib/logjam_agent/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module LogjamAgent
|
2
2
|
class ZMQForwarder
|
3
|
-
attr_reader :app, :env
|
3
|
+
attr_reader :app, :env
|
4
4
|
|
5
5
|
include Util
|
6
6
|
|
@@ -10,9 +10,6 @@ module LogjamAgent
|
|
10
10
|
@env = args[1] || LogjamAgent.environment_name
|
11
11
|
@app_env = "#{@app}-#{@env}"
|
12
12
|
@config = default_options.merge!(opts)
|
13
|
-
@connection_specs = @config[:host].split(',').map do |host|
|
14
|
-
augment_connection_spec(host, @config[:port])
|
15
|
-
end
|
16
13
|
@sequence = 0
|
17
14
|
end
|
18
15
|
|
@@ -25,6 +22,12 @@ module LogjamAgent
|
|
25
22
|
}
|
26
23
|
end
|
27
24
|
|
25
|
+
def connection_specs
|
26
|
+
@connection_specs ||= @config[:host].split(',').map do |host|
|
27
|
+
augment_connection_spec(host, @config[:port])
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
28
31
|
@@mutex = Mutex.new
|
29
32
|
@@zmq_context = nil
|
30
33
|
|
@@ -46,7 +49,7 @@ module LogjamAgent
|
|
46
49
|
socket = self.class.context.socket(ZMQ::PUSH)
|
47
50
|
socket.setsockopt(ZMQ::LINGER, @config[:linger])
|
48
51
|
socket.setsockopt(ZMQ::SNDHWM, @config[:snd_hwm])
|
49
|
-
|
52
|
+
connection_specs.each do |spec|
|
50
53
|
socket.connect(spec)
|
51
54
|
end
|
52
55
|
at_exit { reset }
|