queuery_client 1.1.3 → 1.1.4

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: 4c739774fd292daacd00b2b803065c89d8244a309f2ef09936b107360b4b2cbf
4
- data.tar.gz: 7a2aac170572e82baaf78a8923465e083b6c485e75191842c7a7cad39922e1e1
3
+ metadata.gz: 11b32a624cd5e1125520cc7f1d68d6048f551ebbdfbdb34a2d64520cb3ac89c2
4
+ data.tar.gz: a41d2d8a3148035caadaa435ee98a49db50be5382286c67c78d5faeba157dc1b
5
5
  SHA512:
6
- metadata.gz: a9c74e88514542dba44ca726bd1c085d89ad308b56e2e094c4459055db4e93ae8589d090cb87e2df05d980c4a8d312b1985ab365015c19cbad57ea3ce0e30838
7
- data.tar.gz: cd8d07630fc414c51aa7bec61d8abf5c3dabc93239db9e824577def9a56f7affcc39dd0e38190644f32081e188d5b13d4551b0e93999c76d90698358a75ed5e9
6
+ metadata.gz: 4c9303a966bc816b6fc95eede740ae9cc804f95f8538984726d5f54f96e2b2b9f985e9dc7ecf831a59fb9a334dd9759217c782386b68d0523336153649081f55
7
+ data.tar.gz: 61227ed70ae5620421ccee2445c901a6c6875dd0b9c9758a847b6a0091821e2b5f9906f211118c22419a0a3454a4ab373047ecac346c876984ef064f5c4351ae
@@ -14,14 +14,18 @@ module QueueryClient
14
14
  garage_client.get("/v1/queries/#{id}", fields: '__default__,s3_prefix' + query_option_fields)
15
15
  end
16
16
 
17
+ MAX_POLLING_INTERVAL = 30
18
+
17
19
  def wait_for(id, query_options)
20
+ n = 0
18
21
  loop do
19
22
  query = get_query(id, query_options)
20
23
  case query.status
21
24
  when 'success', 'failed'
22
25
  return query
23
26
  end
24
- sleep 3
27
+ n += 1
28
+ sleep [3 * n, MAX_POLLING_INTERVAL].min
25
29
  end
26
30
  end
27
31
 
@@ -1,3 +1,3 @@
1
1
  module QueueryClient
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queuery_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hidekazu Kobayashi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2021-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: garage_client