tantot 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 56725354395a9033cc635de74a735b73edac40b3
4
- data.tar.gz: f5a41a93122899cb7ee27946a18a50a6b7fec825
3
+ metadata.gz: 9c2d99f4f8b4289301ef52256f0190d78b7fb2c3
4
+ data.tar.gz: b827a5b307879a1682f9b9771b72bf11685d6850
5
5
  SHA512:
6
- metadata.gz: 97e9aad665296f329b93269feb68ba1e6e3aecd099e3b91bc9fe60f3f91fc4f88dbaa4e32b9958e4ad7d4ac55950896b308d81cd6823144975b85033eeded7ce
7
- data.tar.gz: 195da978eb98c9accd59e17b2679012a8e74bbb6bf33092e21cff06f909c3fbac9fa6fd57345ae1b613ab4c6046a664d578437ed52f835fe0080107def78f3fa
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(Tantot.config.chewy_strategy) do
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
@@ -1,3 +1,3 @@
1
1
  module Tantot
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tantot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - François-Pierre Bouchard