queuery_client 1.1.4 → 1.1.5

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
  SHA256:
3
- metadata.gz: 11b32a624cd5e1125520cc7f1d68d6048f551ebbdfbdb34a2d64520cb3ac89c2
4
- data.tar.gz: a41d2d8a3148035caadaa435ee98a49db50be5382286c67c78d5faeba157dc1b
3
+ metadata.gz: 4a1006fdef0ce698e6d38c02fcbeaab4ef928a7be704395d57da8ae963b94301
4
+ data.tar.gz: 70b2fc77eeb6ed27047db209f3aa89cd4a0b5c83fb4616535134e8d14ce537f6
5
5
  SHA512:
6
- metadata.gz: 4c9303a966bc816b6fc95eede740ae9cc804f95f8538984726d5f54f96e2b2b9f985e9dc7ecf831a59fb9a334dd9759217c782386b68d0523336153649081f55
7
- data.tar.gz: 61227ed70ae5620421ccee2445c901a6c6875dd0b9c9758a847b6a0091821e2b5f9906f211118c22419a0a3454a4ab373047ecac346c876984ef064f5c4351ae
6
+ metadata.gz: 7a0338752a52c4f67f94823139bbc78b736a24c143176e5a521c832c2dcb23bda57b3c18adfa0deacc9ab5e52e3dc43728d26db3b790b6bf5dbe64c809f0f9ff
7
+ data.tar.gz: 6f8c7c248f55ba26763e7ff90d2f52c42c9d3776bf690440dd9f3aeda1b22c3f76c109fbe705ead7fc65f03c27a4e7257f0ed2b8976e2e5f27ebafc5ac09fbae
@@ -17,15 +17,20 @@ module QueueryClient
17
17
  MAX_POLLING_INTERVAL = 30
18
18
 
19
19
  def wait_for(id, query_options)
20
- n = 0
20
+ n = 1
21
21
  loop do
22
- query = get_query(id, query_options)
23
- case query.status
24
- when 'success', 'failed'
25
- return query
22
+ begin
23
+ query = get_query(id, query_options)
24
+ case query.status
25
+ when 'success', 'failed'
26
+ return query
27
+ end
28
+ rescue GarageClient::GatewayTimeout
29
+ warn "#{$PROGRAM_NAME}: warning: queuery polling timeout occurred"
26
30
  end
31
+ polling_interval = [3 * n, MAX_POLLING_INTERVAL].min
32
+ sleep polling_interval
27
33
  n += 1
28
- sleep [3 * n, MAX_POLLING_INTERVAL].min
29
34
  end
30
35
  end
31
36
 
@@ -1,3 +1,3 @@
1
1
  module QueueryClient
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queuery_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hidekazu Kobayashi