active_record-pool 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record/base_extension.rb +1 -1
- data/lib/active_record/pool.rb +2 -2
- data/lib/active_record/pool/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edb3d1e5dc9f34d8d326dd1c40b69b6f345f507e
|
4
|
+
data.tar.gz: 1f82b3a423b506f1941e2d1edaa0b788b1314739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0836dd6737e6c964d1958a0fea1556d102c287b13a8554a7da4a49c51d6d5149567c8e1f3f7351052ae842995411a3a65d194f2ec7bd61b5117fa0edb887c6b
|
7
|
+
data.tar.gz: 980f2a2aa35c7d92e8c5311a6cf770636f8f03ff5e1ac50806b3caa9a86a5e274e568cc0981ebaf0ff4fab0006177d477303245065e27e21c028dbe89840ded6
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
class Base
|
3
|
-
def self.pool(columns:, query: self, table: self.
|
3
|
+
def self.pool(columns:, query: self, table: self.arel_table, size: ActiveRecord::Pool::DEFAULT_SIZE, serializer: ActiveRecord::Pool::DEFAULT_SERIALIZER, &iteration)
|
4
4
|
ActiveRecord::Pool.new(columns: columns, query: query, table: table, size: size, serializer: serializer, model: self, &iteration)
|
5
5
|
end
|
6
6
|
end
|
data/lib/active_record/pool.rb
CHANGED
@@ -10,7 +10,7 @@ module ActiveRecord
|
|
10
10
|
|
11
11
|
# `query` is either an ActiveRecord query object or arel
|
12
12
|
# `columns` is a list of columns you want to have during the transaction
|
13
|
-
# `table` is the
|
13
|
+
# `table` is the Arel::Table that operations are cast against
|
14
14
|
# `size` is the maximum number of running iterations in the pool, default: 24
|
15
15
|
# `serializer` is the #dump duck for Array & Hash values, default: JSON
|
16
16
|
# `model` is an ActiveRecord model
|
@@ -18,7 +18,7 @@ module ActiveRecord
|
|
18
18
|
def initialize(query:, columns:, table:, size:, serializer:, model:, &transaction)
|
19
19
|
@query = query
|
20
20
|
@serializer = serializer
|
21
|
-
@table =
|
21
|
+
@table = table
|
22
22
|
qutex = Mutex.new
|
23
23
|
|
24
24
|
queue = case
|