knapsack_pro 0.19.0 → 0.20.0

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: c11586bb78f84d7cf17f4777450e10e93d0b0b08
4
- data.tar.gz: 47d8e142789e12bae228be825f3f9788a03487d7
3
+ metadata.gz: 4b99391f017c93e8649929d9144426a58fa9094e
4
+ data.tar.gz: 3c1d25ddb9b8ee28cd153b3121f2e0a822937702
5
5
  SHA512:
6
- metadata.gz: '0659bed3a7b0be304089b764e528938bc664d9698c39585eac1cc6b1f7df4f79a46e15722f1196b54d753d4d2a7c9182c9f0fec3eb2e3fb5cae76a85d1b3885f'
7
- data.tar.gz: 0366b18ab1098eed6fcfeab6a72b0c04fd9382d5aeef6ff02f6051c73449df9c2cd1cfef4939b75b3503ce0d395655145c0a8fa5b733acdbdc9322c746c71e5d
6
+ metadata.gz: 797f400169a1086b17253a76e4ddfcd1c5fbdb0cbcf06058de4c526052e975342a465db4a73ca077b36af081184e2cb020a018555c753399fe0aa1f0cb89f08e
7
+ data.tar.gz: 7d057ee67fc3736ac0af9022233a83b7fb893c55eb15f546bc3f9561fe527054da57e1c04517497529adbb66074391d883984418120e71a8efe88701c236fced
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.20.0
6
+
7
+ * Wait a few seconds before retrying failed request to API. With each retry wait a bit longer. Retry at most 5 times.
8
+
5
9
  ### 0.19.0
6
10
 
7
11
  * Change timeout to 30s for requests to API.
@@ -99,7 +99,13 @@ module KnapsackPro
99
99
  response
100
100
  rescue Errno::ECONNREFUSED, EOFError, SocketError, Net::OpenTimeout, Net::ReadTimeout => e
101
101
  logger.warn(e.inspect)
102
- retry if (retries += 1) < 3
102
+ retries += 1
103
+ if retries < 5
104
+ wait = retries * 2
105
+ logger.warn("Wait #{wait}s and retry request to Knapsack Pro API.")
106
+ sleep wait
107
+ retry
108
+ end
103
109
  end
104
110
  end
105
111
  end
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.19.0'
2
+ VERSION = '0.20.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2017-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake