sidekiq-paquet 0.2.3 → 0.2.4

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: 7eb372865881c4a07f7ee7f46adb11498cdfcf59
4
- data.tar.gz: e33bc204a400778044a1646b82dcf74a01e4586b
3
+ metadata.gz: 23792de676234e9d5f5327db8ffe329e362cec32
4
+ data.tar.gz: ca4ed1a587f0b3a0c0b853a903cb7fcf971231f0
5
5
  SHA512:
6
- metadata.gz: fe89c8007bef35dce232830315b780c228be6ad15318bde3acca2eb1ecac0e1e7c95b90ba24926db556fdbde8fe271794c6a1d2789f2a4e7c7cc690506157f8e
7
- data.tar.gz: 7e38ea126519a21efd36f241f61cd7ec84a2299c55e455884d2292984b852d8d24f8dadd4859504d9300433d7ca5f728ebea25ebb67477b37986636c7896bf96
6
+ metadata.gz: f0918ed8b779a6b646719aaab9452f20abe90641a9ab53f5a4a07d3db46758cc35c146c64bbc5803dc3fc35de7e39a69a7e2664346dc9c6feb4aa61fb5b9cdcd
7
+ data.tar.gz: 37e2e70ac3cd1f9c925f1fef2b0c45e310dd3c48a49e8fa59f727ba1b53716d094ed498b42a081572528e41b18d894e82aa65f634a8b772da835f2d7a793c884
@@ -19,7 +19,7 @@ module Sidekiq
19
19
  workers = conn.zrange('bundles'.freeze, 0, -1)
20
20
 
21
21
  workers.each do |worker|
22
- klass = worker.constantize
22
+ klass = Object.const_get(worker)
23
23
  opts = klass.get_sidekiq_options
24
24
  min_interval = opts['minimum_execution_interval'.freeze]
25
25
 
@@ -30,7 +30,8 @@ module Sidekiq
30
30
  items = conn.lrange("bundle:#{worker}", 0, -1)
31
31
  items.map! { |i| Sidekiq.load_json(i) }
32
32
 
33
- items.each_slice(opts.fetch('bundle_size'.freeze, Paquet.options[:default_bundle_size])) do |vs|
33
+ bundle_size = opts['bundle_size'.freeze] || Paquet.options[:default_bundle_size]
34
+ items.each_slice(bundle_size) do |vs|
34
35
  Sidekiq::Client.push(
35
36
  'class' => worker,
36
37
  'queue' => opts['queue'.freeze],
@@ -2,7 +2,11 @@ module Sidekiq
2
2
  module Paquet
3
3
  class Middleware
4
4
  def call(worker, item, queue, redis_pool = nil)
5
- if item['bundled'.freeze]
5
+ return yield if defined?(Sidekiq::Testing)
6
+
7
+ retrying = item.key?('failed_at'.freeze)
8
+
9
+ if item['bundled'.freeze] && !retrying
6
10
  Bundle.append(item)
7
11
  false
8
12
  else
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Paquet
3
- VERSION = '0.2.3'
3
+ VERSION = '0.2.4'
4
4
  end
5
5
  end
@@ -24,5 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "bundler", "~> 1.10"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "minitest"
27
- spec.add_development_dependency "redis-namespace", "~> 1.5"
28
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-paquet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ccocchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-21 00:00:00.000000000 Z
11
+ date: 2017-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: redis-namespace
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.5'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.5'
97
83
  description:
98
84
  email:
99
85
  - cocchi.c@gmail.com
@@ -136,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
122
  version: '0'
137
123
  requirements: []
138
124
  rubyforge_project:
139
- rubygems_version: 2.5.1
125
+ rubygems_version: 2.6.14
140
126
  signing_key:
141
127
  specification_version: 4
142
128
  summary: Bulk processing for sidekiq 4+