sessionm-cassandra_object 2.5.4 → 2.5.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -157,15 +157,11 @@ module CassandraObject
|
|
157
157
|
|
158
158
|
if defined?(EM)
|
159
159
|
def self.connection_pool
|
160
|
-
|
161
|
-
EM.reactor_running? ? self.async_ranged_connection_pool : self.sync_ranged_connection_pool
|
162
|
-
else
|
163
|
-
EM.reactor_running? ? self.async_connection_pool : self.sync_connection_pool
|
164
|
-
end
|
160
|
+
EM.reactor_running? ? self.async_connection_pool : self.sync_connection_pool
|
165
161
|
end
|
166
162
|
else
|
167
163
|
def self.connection_pool
|
168
|
-
self.
|
164
|
+
self.sync_connection_pool
|
169
165
|
end
|
170
166
|
end
|
171
167
|
|
@@ -174,12 +170,12 @@ module CassandraObject
|
|
174
170
|
end
|
175
171
|
|
176
172
|
def self.connection()
|
177
|
-
self.connection_pool.connection
|
173
|
+
self.connection_spec[:datacenter] ? self.ranged_connection.connection : self.connection_pool.connection
|
178
174
|
end
|
179
175
|
def self.connection?() !!connection end
|
180
176
|
|
181
177
|
def self.with_connection(key=nil, &block)
|
182
|
-
self.connection_pool.with_connection(&block)
|
178
|
+
self.connection_spec[:datacenter] ? self.ranged_connection_pool.with_connection(key, &block) : self.connection_pool.with_connection(&block)
|
183
179
|
end
|
184
180
|
|
185
181
|
def with_connection(key=nil, &block)
|