after_commit_everywhere 1.2.1 → 1.2.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
2
  SHA256:
3
- metadata.gz: c67c4fd8f55095680c0519cef506d1b7296059b2dd4ce3c94c2a8787cc82c32e
4
- data.tar.gz: e6feb83c65aa88072e56872105cf9511fccd9d4f5410afb9b9fc7060c768b79a
3
+ metadata.gz: e4a45b526cda61ade274b1e038628a0718417047d553c2784242487eca91ad78
4
+ data.tar.gz: ff7c001043feee2cd69d746b0c0fbe9350ebfb608ba94470135280eca878aed1
5
5
  SHA512:
6
- metadata.gz: f1679f32b243651bacc0d2966b4d72b67c1fe190f5a9165702ca11c9edd872b9bec0bd63fd0136b179a4255c5e98f9c957ce3fd67c7ce3454dbd1e201bcf0e01
7
- data.tar.gz: c779815fd32f8e90f1ec01df87eab0a90a2425ad7e738d285d636b6e4762a0d7cb380f423a44087458dd2fdf533df57b8b78bc803ecb9858bf0eac70722cdb34
6
+ metadata.gz: 524ecaf8c3598f724d9c02c0faa6c3f2a0fc6ab89d45fa9bc326a5b4a269d479e450120b75c4585ea9b7ce7a0ce8ec005c248838ca84ba6a7003b48cd0c1d76f
7
+ data.tar.gz: 49f603aca07b79763e21a52cb2495a63ea13be07ce646e5e2883e4448c12a9e06079011f50f674db1abc61cc8e93e08fa13bfa2c8b4877cf5940d757931fbde9
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.2.2 (2022-06-20)
8
+
9
+ ### Fixed
10
+
11
+ - Connection leak from the connection pool when `after_commit` called outside Rails executor without connection checked out *and* some connections were already checked out from another threads.
12
+
13
+ See discussion at [issue #20](https://github.com/Envek/after_commit_everywhere/issues/20) for details.
14
+
15
+ [Pull request #22](https://github.com/Envek/after_commit_everywhere/pull/22) by [@Envek][].
16
+
7
17
  ## 1.2.1 (2022-06-10)
8
18
 
9
19
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- after_commit_everywhere (1.2.0)
4
+ after_commit_everywhere (1.2.2)
5
5
  activerecord (>= 4.2)
6
6
  activesupport
7
7
 
@@ -225,4 +225,4 @@ DEPENDENCIES
225
225
  sqlite3 (~> 1.3, >= 1.3.6)
226
226
 
227
227
  BUNDLED WITH
228
- 2.3.10
228
+ 2.3.16
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AfterCommitEverywhere
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
@@ -125,7 +125,7 @@ module AfterCommitEverywhere
125
125
  # Helper method to determine whether we're currently in transaction or not
126
126
  def in_transaction?(connection = nil)
127
127
  # Don't establish new connection if not connected: we apparently not in transaction
128
- return false unless connection || ActiveRecord::Base.connection_pool.connected?
128
+ return false unless connection || ActiveRecord::Base.connection_pool.active_connection?
129
129
 
130
130
  connection ||= default_connection
131
131
  # service transactions (tests and database_cleaner) are not joinable
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: after_commit_everywhere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-10 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord