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 +4 -4
- data/lib/dns_one/server.rb +15 -0
- data/lib/dns_one/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d78210ea5e09411a507c872baf45cdd2e6d9b645
|
4
|
+
data.tar.gz: 0f3dddc89fb102922fae3506003577cc3fd1f781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f99f8cea22ad191fdc6c99fb791192ce53988d982c31b1a50f24b2dd4e792a26b2f83ae98e8c68dd38f36dac1d4a60d7e850aa753981b268fb2fde3c44ae69c2
|
7
|
+
data.tar.gz: 791b7d95188a5a95da729de2d089b28cc168324ee910d90279aeb8169182f53d0e94fdf60e0d261a2a12400e5a22ce659415955e6dcc285130435aa1e39ddb9a
|
data/lib/dns_one/server.rb
CHANGED
@@ -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
|
|
data/lib/dns_one/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2018-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|