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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f3e6a939a088d7ca9629fc46dd15952337eded9fc46cd448e7b3ad033da7d29
4
- data.tar.gz: cd6727665fda2bc7a86816d84e83916d6f7ee2833470c8ba61ad7dba4cd8ebfb
3
+ metadata.gz: ca8c03f4f1a6b89ca5fc1b9f89b6ac6141cead9b65b78918494eacc40b34205b
4
+ data.tar.gz: 9f962e7fe7d2d379aa9f2b2889876ab79f9ea3542a0a15d3c2e1d072eda50f4a
5
5
  SHA512:
6
- metadata.gz: 595f8df827744753cd99674cd3523f9d68d775e641026cd3919d4df5c914ce93b5a026a36f421f640d84c602ff74f0a1dbe88b005fe1363c45631c573463e541
7
- data.tar.gz: 2a2f824faa41dd4bc8c65cd02ab2d8d6f88c53e752f4b80608f86b425556ecd8e38b42d53f740158704f4b289450c3196701027105382342620c35965fed05dd
6
+ metadata.gz: 24b3f4c90acadac0659a2e38ab07bc351def08d21fe568da8cb6140955a39fce03784006d01cd9899652de163597e7e4ec766ec6f5c65c1cfd7d77e1d7aa03e1
7
+ data.tar.gz: 3aaac4d51b15ec0f2c96784e821092b091b55c857da6a682c402d2315659863ec81f59acd769d3b4b64d450d07999edbdad83761b00585d4376ec57f4ec30489
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.29.5"
2
+ VERSION = "0.29.6"
3
3
  end
@@ -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
- at_exit { ping; reset }
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.5
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-18 00:00:00.000000000 Z
11
+ date: 2019-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake