extendi-cassandra_object 1.0.15 → 1.0.16

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: f2117aaab58c49e408bc93b98da0f914dc0ebb77d4d695e38c5e402a1e9ad07d
4
- data.tar.gz: d9197f6252cd4a4e2dd6979d4e07c738ca080865056eeca62d7d695b8ba3969b
3
+ metadata.gz: 9028050437d393208724283dbafcae0db550abf2f8c213220dc4c97ffeac0e7e
4
+ data.tar.gz: f69906d8afccbd31613b23361181c3d0be04094c7a4082eab67576c342982597
5
5
  SHA512:
6
- metadata.gz: c8ee150f68394f6f48398ab871d47819748a8a2aabbb2d5cbbc623e1d715e9e49f836228bcdb196958d42b3030e347529912c4291c6eca1402caf255ccc333eb
7
- data.tar.gz: b87b35ba76cac1f88643ea765503fa6d8946a2e6b64c31ad1ca94bb0c259941ddf23819fc7b83cfa3053a6369574605279ecc3522fb5fec4da25d3c625df6d5a
6
+ metadata.gz: 7f3709e6fbdad7c30acce8a728a891d41320692b661bf531b0951795d317ac1c36678e7990bcfaeca9f2415ee669465902f1b0370dceb6f5014f61da3e948b31
7
+ data.tar.gz: 5cbeeff769ad4c0d1517049e98c4810a0ac88e7d5b57f37bfefd02c543574c7fee706cfecd2e86f4deba57cefdc2e3dc7d7edff62b5bab5948f6b93e58e7e145
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'extendi-cassandra_object'
5
- s.version = '1.0.15'
5
+ s.version = '1.0.16'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
  s.authors = ['Duccio Giovannelli', 'gotime']
@@ -124,14 +124,25 @@ module CassandraObject
124
124
  end
125
125
 
126
126
  def execute_async(queries, arguments = [])
127
+ retries = 0
127
128
  futures = queries.map do |q|
128
129
  ActiveSupport::Notifications.instrument('cql.cassandra_object', cql: q) do
129
130
  connection.execute_async q, arguments: arguments, consistency: consistency, page_size: config[:page_size]
130
131
  end
131
132
  end
132
133
  futures.map do |future|
133
- rows = future.get
134
- rows
134
+ begin
135
+ rows = future.get
136
+ rows
137
+ rescue StandardError => e
138
+ retries += 1
139
+ sleep 0.01
140
+ if retries <= 3
141
+ retry
142
+ else
143
+ raise e
144
+ end
145
+ end
135
146
  end
136
147
  end
137
148
 
@@ -135,6 +135,7 @@ module CassandraObject
135
135
  end
136
136
 
137
137
  def execute_async(queries, arguments = [], per_page = nil, next_cursor = nil)
138
+ retries = 0
138
139
  per_page ||= config[:page_size]
139
140
  futures = queries.map { |q|
140
141
  ActiveSupport::Notifications.instrument('cql.cassandra_object', cql: q) do
@@ -142,8 +143,18 @@ module CassandraObject
142
143
  end
143
144
  }
144
145
  futures.map do |future|
145
- rows = future.get
146
- rows
146
+ begin
147
+ rows = future.get
148
+ rows
149
+ rescue Exception => e
150
+ retries += 1
151
+ sleep 0.01
152
+ if retries <= 3
153
+ retry
154
+ else
155
+ raise e
156
+ end
157
+ end
147
158
  end
148
159
  end
149
160
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extendi-cassandra_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duccio Giovannelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-21 00:00:00.000000000 Z
12
+ date: 2018-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel