activerecord-transactionable 2.0.1 → 2.0.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 71da1b586cbf4e0fcf0e0f940555a68d0fb896e7b2a68df65df5a47f16df55ed
|
4
|
+
data.tar.gz: 1d727284e32b7567be8124ce5974a98e62df83d43c1aeb4d47e60fa38707a843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c637f6e7e7a1934b837a3b8d4f3414cd37826649592336dd4c3c1e5941354d0604e4abcc5e129e7f4b990f6faefeff88ae4625eac4c4da22cdfc9497b1f4fb4
|
7
|
+
data.tar.gz: '01994cede172bf537fe7d73a29e2c219195c240944ddd8a6aaa0c7f3b6e40c898f185360949f22e2662844f9bf45adccd244cbfc66f3382bb448fc003f1177cb'
|
@@ -49,8 +49,8 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
|
|
49
49
|
OUTSIDE_CONTEXT = "outside".freeze
|
50
50
|
|
51
51
|
def transaction_wrapper(**args)
|
52
|
-
self.class.transaction_wrapper(object: self, **args) do
|
53
|
-
yield
|
52
|
+
self.class.transaction_wrapper(object: self, **args) do |is_retry|
|
53
|
+
yield is_retry
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
@@ -73,9 +73,10 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
|
|
73
73
|
logger.debug("[#{self}.transaction_wrapper] Will start a nested transaction.")
|
74
74
|
end
|
75
75
|
end
|
76
|
-
error_handler_outside_transaction(object: object, transaction_open: transaction_open, **outside_args) do
|
76
|
+
error_handler_outside_transaction(object: object, transaction_open: transaction_open, **outside_args) do |outside_is_retry|
|
77
77
|
run_inside_transaction_block(transaction_args: transaction_args, inside_args: inside_args, lock: lock, transaction_open: transaction_open, object: object) do |is_retry|
|
78
|
-
|
78
|
+
# regardless of the retry being inside or outside the transaction, it is still a retry.
|
79
|
+
yield outside_is_retry || is_retry
|
79
80
|
end
|
80
81
|
end
|
81
82
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-transactionable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
184
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.
|
185
|
+
rubygems_version: 2.7.3
|
186
186
|
signing_key:
|
187
187
|
specification_version: 4
|
188
188
|
summary: Do ActiveRecord transactions the right way.
|