rails-active-mcp 3.1.5 → 3.1.6
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e33dd14dce1495ed61d2e8416360dec54f4eaf906f41812c20360ee6c11126c0
|
|
4
|
+
data.tar.gz: c4c2fb7478c2c839bb6249570699ddad226a4cc63f837be8892a7d6a37c7373d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d62eb7e5f5dffc3a16c92ca3f096f33a8737a59e0cbdd37fe47dda3ba55d04326c127668679dbb7f27e8c6f1fae853fc63762092608ba99545ff72afe839a4e
|
|
7
|
+
data.tar.gz: d7692dc73706b28bc2e30b4fef01727cf4305dae03bac2b38b3424eef8027e0f2e58e5f052eeced6fa50f38b2afea664b16a10a692f323ffc8c1cf7198aa4030
|
|
@@ -8,7 +8,12 @@ module RailsActiveMcp
|
|
|
8
8
|
return unless defined?(::ActiveRecord::Base)
|
|
9
9
|
|
|
10
10
|
# Clean up connections to prevent pool exhaustion
|
|
11
|
-
|
|
11
|
+
# Rails 7.2+ removed clear_active_connections! from ActiveRecord::Base
|
|
12
|
+
if ::ActiveRecord::Base.connection_pool.respond_to?(:release_connection)
|
|
13
|
+
::ActiveRecord::Base.connection_pool.release_connection
|
|
14
|
+
elsif ::ActiveRecord::Base.respond_to?(:clear_active_connections!)
|
|
15
|
+
::ActiveRecord::Base.clear_active_connections!
|
|
16
|
+
end
|
|
12
17
|
GC.start if rand(100) < 5
|
|
13
18
|
end
|
|
14
19
|
end
|