tantot 0.1.2 → 0.1.3
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/tantot/performer/chewy.rb +2 -2
- data/lib/tantot/version.rb +1 -1
- data/spec/extensions/chewy_spec.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c2d99f4f8b4289301ef52256f0190d78b7fb2c3
|
4
|
+
data.tar.gz: b827a5b307879a1682f9b9771b72bf11685d6850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a475eb7b2913b50b3ad68997b3d12352608301c20748f4c2cb6d8359111c87bb51448697257ddab34a770b3e618349e5a1ced6feceb9143f153779dc6f8541e5
|
7
|
+
data.tar.gz: 61568c338ed951d8b367a803d307d321a33484c2c5d13d790ca70038c14a7f610d88e3adcefb42919006465a5e361cd0a3ecfc9f6086b4a92eea84f8da8e5498
|
@@ -6,7 +6,7 @@ module Tantot
|
|
6
6
|
|
7
7
|
def perform(context, changes)
|
8
8
|
context, changes = Tantot.collector.unmarshal(context, changes)
|
9
|
-
::Chewy.strategy(
|
9
|
+
::Chewy.strategy(context[:chewy_strategy]) do
|
10
10
|
Tantot.collector.perform(context, changes)
|
11
11
|
end
|
12
12
|
end
|
@@ -17,7 +17,7 @@ module Tantot
|
|
17
17
|
when :atomic, :urgent
|
18
18
|
Tantot::Performer::Inline.new.run(context, changes)
|
19
19
|
when /sidekiq/
|
20
|
-
context, changes = Tantot.collector.marshal(context, changes)
|
20
|
+
context, changes = Tantot.collector.marshal(context.merge({chewy_strategy: ::Chewy.strategy.current.name}), changes)
|
21
21
|
Tantot::Performer::Chewy::Worker.perform_async(context, changes)
|
22
22
|
when :bypass
|
23
23
|
return
|
data/lib/tantot/version.rb
CHANGED
@@ -135,6 +135,20 @@ if defined?(::Chewy)
|
|
135
135
|
City.create!
|
136
136
|
end
|
137
137
|
end
|
138
|
+
|
139
|
+
if defined?(::Sidekiq)
|
140
|
+
context "using Sidekiq" do
|
141
|
+
require 'sidekiq/testing'
|
142
|
+
|
143
|
+
around do |example|
|
144
|
+
Sidekiq::Worker.clear_all
|
145
|
+
Tantot.config.performer = :sidekiq
|
146
|
+
example.run
|
147
|
+
Tantot.config.performer = :inline
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
138
152
|
end
|
139
153
|
|
140
154
|
end
|