libhoney 1.10.0 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libhoney/transmission.rb +10 -6
- data/lib/libhoney/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 701a19cd4bde8de2dfa4a6f3ab46e9a2b6aa08df13e1cecb7b7b0fccb0fe7d4a
|
4
|
+
data.tar.gz: 8179e03fb6b2711abda9dfb26ffffe6d3e8c5fae600fe917301a02cc5fe6fb39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0175476abe1c2bfc530964fd3f5750fadbfc97df3661214975dc5ac2cfe033eace5c575a81c59cb5b977f3ed51cd4f802bba43e468c2fa297700904f5f0226ef
|
7
|
+
data.tar.gz: eea06aab450dc777b1598c23ecda377fbd888423419406568fb66a7b005609028b3f58582d887eb23f1e871b659e1eb8afd6d6355b1c1d82fcf85ef5a2f3d135
|
@@ -39,12 +39,7 @@ module Libhoney
|
|
39
39
|
# happens if the queue was full and block_on_send = false.
|
40
40
|
end
|
41
41
|
|
42
|
-
|
43
|
-
return if @threads.length > 0
|
44
|
-
while @threads.length < @max_concurrent_batches
|
45
|
-
@threads << Thread.new { self.send_loop }
|
46
|
-
end
|
47
|
-
}
|
42
|
+
ensure_threads_running
|
48
43
|
end
|
49
44
|
|
50
45
|
def send_loop
|
@@ -124,5 +119,14 @@ module Libhoney
|
|
124
119
|
ua << " #{user_agent_addition}" if user_agent_addition
|
125
120
|
ua
|
126
121
|
end
|
122
|
+
|
123
|
+
def ensure_threads_running
|
124
|
+
@lock.synchronize {
|
125
|
+
@threads.select!(&:alive?)
|
126
|
+
while @threads.length < @max_concurrent_batches
|
127
|
+
@threads << Thread.new { self.send_loop }
|
128
|
+
end
|
129
|
+
}
|
130
|
+
end
|
127
131
|
end
|
128
132
|
end
|
data/lib/libhoney/version.rb
CHANGED