perus 0.1.27 → 0.1.28

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: f160a401fd4a0f8bda1129984974d3722bb2ce3a
4
- data.tar.gz: 8f4ce061645f1db4593f264af2ee5caf7247745a
3
+ metadata.gz: 91f98973d5bdd83cafeb1ef537fbf51f549224ef
4
+ data.tar.gz: a9cd139a54b24b664c974bd5132e52783df9ebb4
5
5
  SHA512:
6
- metadata.gz: f49ce6fc257063e0fd4199517abbcf4451a7c792259633d02c993e4e74ae78f3b17f585f2fe983c95f32369722a75f5c146002f80cb8beaa6cba2068dc80eae5
7
- data.tar.gz: 2670afc4641314e0b664b9ae4bc4b77bf4c3d0ff5fcad3ea79988ce44da01e230a259da77bfa58cd2a0dea6c8ddb5ad37472cdd05dba7afa1df19529607300c7
6
+ metadata.gz: b8b764cab1b3a391826a86e471a635c084377b9e90f0c28f86c0d1d7a59d8e815881923c6901d18e3700cbe8462f2cdf65d17abaf2d69e88226be01afcfeb6fe
7
+ data.tar.gz: 7d554286284a864ddf7bde51774b81c920e55aa6f77a11200b2f81e784d2e90cbfdd39769056f00fc2cf0821060213d86bd607ec10f9f3d48aa1255b6f803d74
@@ -103,7 +103,19 @@ module Perus::Pinger
103
103
  config_url = (@server_uri + config_path).to_s
104
104
 
105
105
  # load the system config by requesting it from the perus server
106
- json = JSON.parse(RestClient.get(config_url))
106
+ tries = 0
107
+ json = begin
108
+ JSON.parse(RestClient.get(config_url))
109
+ rescue => e
110
+ if tries < 5
111
+ tries += 1
112
+ sleep 2
113
+ retry
114
+ else
115
+ raise e
116
+ end
117
+ end
118
+
107
119
  json['metrics'] ||= []
108
120
  json['actions'] ||= []
109
121
  @system_id = json['id']
data/lib/perus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Perus
2
- VERSION = "0.1.27"
2
+ VERSION = "0.1.28"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Cannings