percy-common 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/percy/common/version.rb +1 -1
- data/lib/percy/stats.rb +12 -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: e83edb8522d97d14d009c557cc1cf30e9dfb8e14
|
4
|
+
data.tar.gz: ed41e132239c852c14c9db2387f075cf200ec694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20290f9419c06622b11192f2a40de6265593e868d2ee70cf9d9cd5a4443fb9c38db76246f75ca95438e4a405f399c3bf4c0267ddd3daca2676990d87ece77905
|
7
|
+
data.tar.gz: ba60224166e45dbd34f6919d27b2bff99c4d660d78dab56002240a358678d43fe02f30b22ed9fa8107eb1ca04f2fb796f0ce9c48b9d718d9c6193cba9fa1ff74
|
data/.travis.yml
CHANGED
data/lib/percy/common/version.rb
CHANGED
data/lib/percy/stats.rb
CHANGED
@@ -8,7 +8,18 @@ module Percy
|
|
8
8
|
port ||= Integer(ENV.fetch('DATADOG_AGENT_PORT', ::Datadog::Statsd::DEFAULT_PORT))
|
9
9
|
opts[:tags] ||= []
|
10
10
|
opts[:tags] << "env:#{ENV['PERCY_ENV'] || 'development'}"
|
11
|
-
|
11
|
+
retry_delay = opts[:retry_delay] || 1
|
12
|
+
retry_count = opts[:retry_count] || 3
|
13
|
+
retries = 0
|
14
|
+
|
15
|
+
begin
|
16
|
+
super(host, port, opts, max_buffer_size)
|
17
|
+
rescue SocketError
|
18
|
+
host = 'localhost' if retries >= retry_count
|
19
|
+
sleep retry_delay
|
20
|
+
retries += 1
|
21
|
+
retry
|
22
|
+
end
|
12
23
|
end
|
13
24
|
|
14
25
|
# Equivalent to stats.time, but without wrapping in blocks and dealing with var scoping issues.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dogstatsd-ruby
|