gb_dispatch 0.1.3 → 0.1.4
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/lib/gb_dispatch/queue.rb +0 -4
- data/lib/gb_dispatch/version.rb +1 -1
- data/spec/queue_spec.rb +0 -3
- 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: 1c59ba469fa518ae4155cc6bd0f47054e71015e5e945250cf8db53ee09cb67ad
|
|
4
|
+
data.tar.gz: 276468d56b40a9aea7753d62196273956e24145a2a0398b8d6c7a3c48c4b7b31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2da4897ce97fef40cb183aa62cfc742a4e0df4c17a3f538ea8769c85fa1983ac6d4cc08ae715aaec2cb5244b5d2d640478525e125fe1e30ea8da8306a833b78e
|
|
7
|
+
data.tar.gz: d3943ef7a5a087a2fd5f2a816c09a727ce0b710d202c4eaba3f59f15678ce26dfb5d0e417e6711effefba7a81fbdf405facc767b433914e4ffa0e8fab2e41a77
|
data/lib/gb_dispatch/queue.rb
CHANGED
|
@@ -59,13 +59,9 @@ module GBDispatch
|
|
|
59
59
|
return yield unless defined?(ActiveRecord::Base)
|
|
60
60
|
|
|
61
61
|
require 'gb_dispatch/active_record_patch'
|
|
62
|
-
begin
|
|
63
62
|
ActiveRecord::Base.connection_pool.with_connection do
|
|
64
63
|
yield
|
|
65
64
|
end
|
|
66
|
-
ensure
|
|
67
|
-
ActiveRecord::Base.clear_active_connections!
|
|
68
|
-
end
|
|
69
65
|
end
|
|
70
66
|
|
|
71
67
|
def with_rails_executor
|
data/lib/gb_dispatch/version.rb
CHANGED
data/spec/queue_spec.rb
CHANGED
|
@@ -140,7 +140,6 @@ describe GBDispatch::Queue do
|
|
|
140
140
|
a = :foo
|
|
141
141
|
queue = GBDispatch::Queue.new(:test)
|
|
142
142
|
expect(ActiveRecord::Base.connection_pool).to receive(:with_connection).and_call_original
|
|
143
|
-
expect(ActiveRecord::Base).to receive(:clear_active_connections!)
|
|
144
143
|
queue.await.perform_now do
|
|
145
144
|
a = :bar
|
|
146
145
|
end
|
|
@@ -192,7 +191,6 @@ describe GBDispatch::Queue do
|
|
|
192
191
|
a = :foo
|
|
193
192
|
queue = GBDispatch::Queue.new(:test)
|
|
194
193
|
expect(ActiveRecord::Base.connection_pool).to receive(:with_connection).and_call_original
|
|
195
|
-
expect(ActiveRecord::Base).to receive(:clear_active_connections!)
|
|
196
194
|
queue.await.perform_now do
|
|
197
195
|
a = :bar
|
|
198
196
|
end
|
|
@@ -203,7 +201,6 @@ describe GBDispatch::Queue do
|
|
|
203
201
|
a = :foo
|
|
204
202
|
queue = GBDispatch::Queue.new(:test)
|
|
205
203
|
expect(ActiveRecord::Base.connection_pool).to receive(:with_connection).and_call_original
|
|
206
|
-
expect(ActiveRecord::Base).to receive(:clear_active_connections!)
|
|
207
204
|
queue.await.perform_now ->() { a = :bar }
|
|
208
205
|
expect(a).to eq :bar
|
|
209
206
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gb_dispatch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kacper Kawecki
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-03-
|
|
10
|
+
date: 2026-03-19 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: concurrent-ruby
|