dns_one 0.5.4 → 0.5.5

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
  SHA1:
3
- metadata.gz: dafa640dc8815562ed27e6f49e9b0b5154f90673
4
- data.tar.gz: 1544acf2162fffcc5d7bdb5b4a04cdeee96f1a5b
3
+ metadata.gz: d78210ea5e09411a507c872baf45cdd2e6d9b645
4
+ data.tar.gz: 0f3dddc89fb102922fae3506003577cc3fd1f781
5
5
  SHA512:
6
- metadata.gz: a21555de7c3c263252ba6d8566535202fbc318010b8b4e22a6f41ceaee815f90999d6569b9df31277f987b4b31536c3d5d43276b3601bc5dc2f111c5e60a8829
7
- data.tar.gz: f727d926263b706b1fae79b739ab3599357764443b16df3e025c93c701a33a816492e14f7b74011a10d2278767601536109d49d615bdeb2ca7e8d2ce22a8b15a
6
+ metadata.gz: f99f8cea22ad191fdc6c99fb791192ce53988d982c31b1a50f24b2dd4e792a26b2f83ae98e8c68dd38f36dac1d4a60d7e850aa753981b268fb2fde3c44ae69c2
7
+ data.tar.gz: 791b7d95188a5a95da729de2d089b28cc168324ee910d90279aeb8169182f53d0e94fdf60e0d261a2a12400e5a22ce659415955e6dcc285130435aa1e39ddb9a
@@ -32,6 +32,7 @@ module DnsOne; class Server
32
32
  log_result = @log_result
33
33
  log_result_mutex = @log_result_mutex
34
34
  launch_log_result_socket
35
+ log_result_last_reset = 0
35
36
  end
36
37
 
37
38
  RubyDNS::run_server(listen: dns_daemon_interfaces, logger: Log.ruby_dns_logger) do
@@ -84,6 +85,20 @@ module DnsOne; class Server
84
85
 
85
86
  if conf[:log_result_socket]
86
87
  log_result_mutex.synchronize {
88
+ # Reset log_result every 5 min
89
+ if Time.now.to_i / 300 > log_result_last_reset / 300
90
+ log_result_last_reset = Time.now.to_i
91
+ log_result.each_key do |k|
92
+ if log_result[k].is_a? Hash
93
+ log_result[k].each_key do |k2|
94
+ log_result[k][k2] = 0
95
+ end
96
+ else
97
+ log_result[k] = 0
98
+ end
99
+ end
100
+ end
101
+
87
102
  log_result[:requests] ||= 0
88
103
  log_result[:requests] += 1
89
104
 
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-18 00:00:00.000000000 Z
11
+ date: 2018-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler