idempo 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/idempo/active_record_backend.rb +8 -6
- data/lib/idempo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f7d90c5ffda4a513a27f7bc55ead7fd02ca35767135d726a4eaf42f9e71045
|
4
|
+
data.tar.gz: 9ac0f66203734a0744d553eec1760342f89ee8f436f84297edbea002298ef7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3f42ab5bc2c256ad672555fe0e1768421de19b8ee46af1d3d25548b467804227197e159cba8cfbb8397d6103b62aea49d5e187b856bd438603f85a9eeadc17c
|
7
|
+
data.tar.gz: 2e701bfd31e53607820bbaae2bef63633e9c903db7be25406a8a84d9565ebf49d2903dc7afcb6c27e614b5625444e9071f2e9f1be894ddfac0a59b2933ceeee5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 1.3.1
|
2
|
+
|
3
|
+
- Instead of retaining the ActiveRecord connection in Idempo operations, check it out temporarily from the AR pool.
|
4
|
+
This should improve interop with fibers/Async.
|
5
|
+
|
1
6
|
## 1.3.0
|
2
7
|
|
3
8
|
- Streamline integration with both Rack 2 and 3, add tests for request fingerprinting.
|
@@ -82,13 +82,15 @@ class Idempo::ActiveRecordBackend
|
|
82
82
|
# process) and then once we have that - the DB lock.
|
83
83
|
@memory_lock.with(request_key) do
|
84
84
|
db_safe_key = Digest::SHA1.base64digest(request_key)
|
85
|
-
|
86
|
-
|
85
|
+
ActiveRecord::Base.connection_pool.with_connection do |connection|
|
86
|
+
database_lock = lock_implementation_for_connection(connection)
|
87
|
+
raise Idempo::ConcurrentRequest unless database_lock.acquire(connection, request_key)
|
87
88
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
begin
|
90
|
+
yield(Store.new(db_safe_key, model))
|
91
|
+
ensure
|
92
|
+
database_lock.release(connection, request_key)
|
93
|
+
end
|
92
94
|
end
|
93
95
|
end
|
94
96
|
end
|
data/lib/idempo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idempo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|