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 +4 -4
- data/lib/sidekiq/paquet/bundle.rb +3 -2
- data/lib/sidekiq/paquet/middleware.rb +5 -1
- data/lib/sidekiq/paquet/version.rb +1 -1
- data/sidekiq-paquet.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23792de676234e9d5f5327db8ffe329e362cec32
|
4
|
+
data.tar.gz: ca4ed1a587f0b3a0c0b853a903cb7fcf971231f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
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
|
data/sidekiq-paquet.gemspec
CHANGED
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.
|
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:
|
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.
|
125
|
+
rubygems_version: 2.6.14
|
140
126
|
signing_key:
|
141
127
|
specification_version: 4
|
142
128
|
summary: Bulk processing for sidekiq 4+
|