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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9028050437d393208724283dbafcae0db550abf2f8c213220dc4c97ffeac0e7e
|
4
|
+
data.tar.gz: f69906d8afccbd31613b23361181c3d0be04094c7a4082eab67576c342982597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f3709e6fbdad7c30acce8a728a891d41320692b661bf531b0951795d317ac1c36678e7990bcfaeca9f2415ee669465902f1b0370dceb6f5014f61da3e948b31
|
7
|
+
data.tar.gz: 5cbeeff769ad4c0d1517049e98c4810a0ac88e7d5b57f37bfefd02c543574c7fee706cfecd2e86f4deba57cefdc2e3dc7d7edff62b5bab5948f6b93e58e7e145
|
@@ -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
|
-
|
134
|
-
|
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
|
-
|
146
|
-
|
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.
|
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-
|
12
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|