sidekiq 2.17.0 → 2.17.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +2 -10
- data/Changes.md +10 -1
- data/Gemfile +7 -0
- data/Pro-Changes.md +32 -6
- data/README.md +3 -3
- data/lib/sidekiq/extensions/action_mailer.rb +6 -3
- data/lib/sidekiq/extensions/active_record.rb +6 -3
- data/lib/sidekiq/extensions/class_methods.rb +6 -3
- data/lib/sidekiq/fetch.rb +2 -0
- data/lib/sidekiq/manager.rb +1 -0
- data/lib/sidekiq/version.rb +1 -1
- data/sidekiq.gemspec +1 -1
- data/test/test_manager.rb +1 -1
- data/test/test_web.rb +3 -3
- data/web/assets/stylesheets/application.css +8 -4
- data/web/views/_job_info.erb +1 -1
- data/web/views/retries.erb +4 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24bfd443535efddca7164e0784c5317d25487673
|
4
|
+
data.tar.gz: 24e85e77a30f1e6dba72ae0a965fa63b4b8b5b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b031f54208e373dcf35a2c4da99a8756b6c5cfa8fe984e9bce4841d01240780dac4f052cdef86474788c23f317f9f54415bb3e2ce9cd1de868a621767291ea2
|
7
|
+
data.tar.gz: b66143b6db4ba974f8d9846728e109b27c3fb95fe3e8aa5182698e2c539e0a4d729b26da3e776d619b72d5c850c8e45e491cd186394d847f5e3cbb0d75e9479f
|
data/.travis.yml
CHANGED
@@ -4,17 +4,9 @@ services:
|
|
4
4
|
rvm:
|
5
5
|
- 1.9.3
|
6
6
|
- jruby-19mode
|
7
|
-
- rbx
|
7
|
+
- rbx
|
8
8
|
- 2.0.0
|
9
|
-
branches:
|
10
|
-
only:
|
11
|
-
- master
|
12
|
-
notifications:
|
13
|
-
irc: "irc.freenode.org#sidekiq"
|
14
|
-
email:
|
15
|
-
recipients:
|
16
|
-
- sidekiq@librelist.org
|
17
9
|
matrix:
|
18
10
|
allow_failures:
|
19
11
|
- rvm: jruby-19mode
|
20
|
-
- rvm: rbx
|
12
|
+
- rvm: rbx
|
data/Changes.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
2.17.1
|
2
|
+
-----------
|
3
|
+
|
4
|
+
- Expose `delay` extension as `sidekiq_delay` also. This allows you to
|
5
|
+
run Delayed::Job and Sidekiq in the same process, selectively porting
|
6
|
+
`delay` calls to `sidekiq_delay`. You just need to ensure that
|
7
|
+
Sidekiq is required **before** Delayed::Job in your Gemfile. [#1393]
|
8
|
+
- Bump redis client required version to 3.0.6
|
9
|
+
- Minor CSS fixes for Web UI
|
10
|
+
|
1
11
|
2.17.0
|
2
12
|
-----------
|
3
13
|
|
4
|
-
- Change USR1 signal handling to exit process as soon as all workers are quiet. [#1358]
|
5
14
|
- Change `Sidekiq::Client#push_bulk` to return an array of pushed `jid`s. [#1315, barelyknown]
|
6
15
|
- Web UI refactoring to use more API internally (yummy dogfood!)
|
7
16
|
- Much faster Sidekiq::Job#delete performance for larger queue sizes
|
data/Gemfile
CHANGED
@@ -1,2 +1,9 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
|
+
|
4
|
+
platforms :rbx do
|
5
|
+
gem 'rubysl', '~> 2.0' # if using anything in the ruby standard library
|
6
|
+
gem 'psych' # if using yaml
|
7
|
+
gem 'minitest' # if using minitest
|
8
|
+
gem 'rubinius-developer_tools' # if using any of coverage, debugger, profiler
|
9
|
+
end
|
data/Pro-Changes.md
CHANGED
@@ -3,7 +3,31 @@ Sidekiq Pro Changelog
|
|
3
3
|
|
4
4
|
Please see [http://sidekiq.org/pro](http://sidekiq.org/pro) for more details and how to buy.
|
5
5
|
|
6
|
-
|
6
|
+
1.4.0
|
7
|
+
-----------
|
8
|
+
|
9
|
+
- Default batch expiration has been extended to 3 days, from 1 day previously.
|
10
|
+
- Batches now sort in the Web UI according to expiry time, not creation time.
|
11
|
+
- Add user-configurable batch expiry. If your batches might take longer
|
12
|
+
than 72 hours to process, you can extend the expiration date.
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
b = Sidekiq::Batch.new
|
16
|
+
b.expires_in 5.days
|
17
|
+
...
|
18
|
+
```
|
19
|
+
|
20
|
+
1.3.2
|
21
|
+
-----------
|
22
|
+
|
23
|
+
- Lazy load Lua scripts so a Redis connection is not required on bootup.
|
24
|
+
|
25
|
+
1.3.1
|
26
|
+
-----------
|
27
|
+
|
28
|
+
- Fix a gemspec packaging issue which broke the Batch UI.
|
29
|
+
|
30
|
+
1.3.0
|
7
31
|
-----------
|
8
32
|
|
9
33
|
Thanks to @jonhyman for his contributions to this Sidekiq Pro release.
|
@@ -16,12 +40,13 @@ functionality will be unavailable.
|
|
16
40
|
You can now filter retries and scheduled jobs in the Web UI so you
|
17
41
|
only see the jobs relevant to your needs. Queues cannot be filtered;
|
18
42
|
Redis does not provide the same SCAN operation on the LIST type.
|
19
|
-
**Redis 2.8
|
43
|
+
**Redis 2.8**
|
44
|
+
![Filtering](https://f.cloud.github.com/assets/2911/1619465/f47529f2-5657-11e3-8cd1-33899eb72aad.png)
|
20
45
|
- SCAN support in the Sidekiq::SortedSet API. Here's an example that
|
21
46
|
finds all jobs which contain the substring "Warehouse::OrderShip"
|
22
47
|
and deletes all matching retries. If the set is large, this API
|
23
48
|
will be **MUCH** faster than standard iteration using each.
|
24
|
-
**Redis 2.8
|
49
|
+
**Redis 2.8**
|
25
50
|
```ruby
|
26
51
|
Sidekiq::RetrySet.new.scan("Warehouse::OrderShip") do |job|
|
27
52
|
job.delete
|
@@ -33,7 +58,7 @@ functionality will be unavailable.
|
|
33
58
|
- Sidekiq::Batch#remove\_jobs(jid, jid, ...) removes JIDs from the set, allowing early termination of jobs if they become irrelevant according to application logic.
|
34
59
|
- Sidekiq::Batch#include?(jid) allows jobs to check if they are still
|
35
60
|
relevant to a Batch and exit early if not.
|
36
|
-
- Sidekiq::SortedSet#find\_job(jid) now uses server-side Lua **Redis 2.6
|
61
|
+
- Sidekiq::SortedSet#find\_job(jid) now uses server-side Lua if possible **Redis 2.6** [jonhyman]
|
37
62
|
- The statsd integration now sets global job counts:
|
38
63
|
```ruby
|
39
64
|
jobs.count
|
@@ -44,6 +69,7 @@ functionality will be unavailable.
|
|
44
69
|
- Change shutdown logic to push leftover jobs in the private queue back
|
45
70
|
into the public queue when shutting down with Reliable Fetch. This
|
46
71
|
allows the safe decommission of a Sidekiq Pro process when autoscaling. [jonhyman]
|
72
|
+
- Add support for weighted random fetching with Reliable Fetch [jonhyman]
|
47
73
|
- Pro now requires Sidekiq 2.17.0
|
48
74
|
|
49
75
|
1.2.5
|
@@ -88,7 +114,7 @@ functionality will be unavailable.
|
|
88
114
|
- Fix issue with reliable\_push where it didn't return the JID for a pushed
|
89
115
|
job when sending previously cached jobs to Redis.
|
90
116
|
- Add fast Sidekiq::Queue#delete\_job(jid) API which leverages Lua so job lookup is
|
91
|
-
100% server-side. Benchmark vs Sidekiq's Job#delete API
|
117
|
+
100% server-side. Benchmark vs Sidekiq's Job#delete API. **Redis 2.6**
|
92
118
|
|
93
119
|
```
|
94
120
|
Sidekiq Pro API
|
@@ -98,7 +124,7 @@ Sidekiq API
|
|
98
124
|
```
|
99
125
|
|
100
126
|
- Add fast Sidekiq::Queue#delete\_by\_class(klass) API to remove all
|
101
|
-
jobs of a given type. Uses server-side Lua for performance.
|
127
|
+
jobs of a given type. Uses server-side Lua for performance. **Redis 2.6**
|
102
128
|
|
103
129
|
1.1.0
|
104
130
|
-----------
|
data/README.md
CHANGED
@@ -60,9 +60,9 @@ quality open source development all at the same time. Please see the
|
|
60
60
|
More Information
|
61
61
|
-----------------
|
62
62
|
|
63
|
-
Please see the [sidekiq wiki](https://github.com/mperham/sidekiq/wiki) for
|
63
|
+
Please see the [sidekiq wiki](https://github.com/mperham/sidekiq/wiki) for the official documentation.
|
64
64
|
[#sidekiq on irc.freenode.net](irc://irc.freenode.net/#sidekiq) is dedicated to this project,
|
65
|
-
but bug reports or feature requests suggestions should still go through [issues on Github](https://github.com/mperham/sidekiq/issues).
|
65
|
+
but bug reports or feature requests suggestions should still go through [issues on Github](https://github.com/mperham/sidekiq/issues). Release announcements are made to [@sidekiq](https://twitter.com/sidekiq)
|
66
66
|
|
67
67
|
There's also a mailing list via [Librelist](http://librelist.org) that you can subscribe to by sending
|
68
68
|
an email to <sidekiq@librelist.org> with a greeting in the body. To unsubscribe, send an email to <sidekiq-unsubscribe@librelist.org> and that's it!
|
@@ -87,4 +87,4 @@ Please see [LICENSE](https://github.com/mperham/sidekiq/blob/master/LICENSE) for
|
|
87
87
|
Author
|
88
88
|
-----------------
|
89
89
|
|
90
|
-
Mike Perham, [@mperham](https://twitter.com/mperham), [http://mikeperham.com](http://mikeperham.com)
|
90
|
+
Mike Perham, [@mperham](https://twitter.com/mperham) / [@sidekiq](https://twitter.com/sidekiq), [http://mikeperham.com](http://mikeperham.com)
|
@@ -22,15 +22,18 @@ module Sidekiq
|
|
22
22
|
end
|
23
23
|
|
24
24
|
module ActionMailer
|
25
|
-
def
|
25
|
+
def sidekiq_delay(options={})
|
26
26
|
Proxy.new(DelayedMailer, self, options)
|
27
27
|
end
|
28
|
-
def
|
28
|
+
def sidekiq_delay_for(interval, options={})
|
29
29
|
Proxy.new(DelayedMailer, self, options.merge('at' => Time.now.to_f + interval.to_f))
|
30
30
|
end
|
31
|
-
def
|
31
|
+
def sidekiq_delay_until(timestamp, options={})
|
32
32
|
Proxy.new(DelayedMailer, self, options.merge('at' => timestamp.to_f))
|
33
33
|
end
|
34
|
+
alias_method :delay, :sidekiq_delay
|
35
|
+
alias_method :delay_for, :sidekiq_delay_for
|
36
|
+
alias_method :delay_until, :sidekiq_delay_until
|
34
37
|
end
|
35
38
|
|
36
39
|
end
|
@@ -21,15 +21,18 @@ module Sidekiq
|
|
21
21
|
end
|
22
22
|
|
23
23
|
module ActiveRecord
|
24
|
-
def
|
24
|
+
def sidekiq_delay(options={})
|
25
25
|
Proxy.new(DelayedModel, self, options)
|
26
26
|
end
|
27
|
-
def
|
27
|
+
def sidekiq_delay_for(interval, options={})
|
28
28
|
Proxy.new(DelayedModel, self, options.merge('at' => Time.now.to_f + interval.to_f))
|
29
29
|
end
|
30
|
-
def
|
30
|
+
def sidekiq_delay_until(timestamp, options={})
|
31
31
|
Proxy.new(DelayedModel, self, options.merge('at' => timestamp.to_f))
|
32
32
|
end
|
33
|
+
alias_method :delay, :sidekiq_delay
|
34
|
+
alias_method :delay_for, :sidekiq_delay_for
|
35
|
+
alias_method :delay_until, :sidekiq_delay_until
|
33
36
|
end
|
34
37
|
|
35
38
|
end
|
@@ -19,15 +19,18 @@ module Sidekiq
|
|
19
19
|
end
|
20
20
|
|
21
21
|
module Klass
|
22
|
-
def
|
22
|
+
def sidekiq_delay(options={})
|
23
23
|
Proxy.new(DelayedClass, self, options)
|
24
24
|
end
|
25
|
-
def
|
25
|
+
def sidekiq_delay_for(interval, options={})
|
26
26
|
Proxy.new(DelayedClass, self, options.merge('at' => Time.now.to_f + interval.to_f))
|
27
27
|
end
|
28
|
-
def
|
28
|
+
def sidekiq_delay_until(timestamp, options={})
|
29
29
|
Proxy.new(DelayedClass, self, options.merge('at' => timestamp.to_f))
|
30
30
|
end
|
31
|
+
alias_method :delay, :sidekiq_delay
|
32
|
+
alias_method :delay_for, :sidekiq_delay_for
|
33
|
+
alias_method :delay_until, :sidekiq_delay_until
|
31
34
|
end
|
32
35
|
|
33
36
|
end
|
data/lib/sidekiq/fetch.rb
CHANGED
@@ -93,6 +93,8 @@ module Sidekiq
|
|
93
93
|
# By leaving this as a class method, it can be pluggable and used by the Manager actor. Making it
|
94
94
|
# an instance method will make it async to the Fetcher actor
|
95
95
|
def self.bulk_requeue(inprogress, options)
|
96
|
+
return if inprogress.empty?
|
97
|
+
|
96
98
|
Sidekiq.logger.debug { "Re-queueing terminated jobs" }
|
97
99
|
jobs_to_requeue = {}
|
98
100
|
inprogress.each do |unit_of_work|
|
data/lib/sidekiq/manager.rb
CHANGED
@@ -167,6 +167,7 @@ module Sidekiq
|
|
167
167
|
requeue
|
168
168
|
|
169
169
|
logger.warn { "Terminating #{@busy.size} busy worker threads" }
|
170
|
+
logger.warn { "Work still in progress #{@in_progress.values.inspect}" }
|
170
171
|
@busy.each do |processor|
|
171
172
|
if processor.alive? && t = @threads.delete(processor.object_id)
|
172
173
|
t.raise Shutdown
|
data/lib/sidekiq/version.rb
CHANGED
data/sidekiq.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.name = "sidekiq"
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Sidekiq::VERSION
|
17
|
-
gem.add_dependency 'redis', '>= 3.0.
|
17
|
+
gem.add_dependency 'redis', '>= 3.0.6'
|
18
18
|
gem.add_dependency 'redis-namespace', '>= 1.3.1'
|
19
19
|
gem.add_dependency 'connection_pool', '>= 1.0.0'
|
20
20
|
gem.add_dependency 'celluloid', '>= 0.15.2'
|
data/test/test_manager.rb
CHANGED
data/test/test_web.rb
CHANGED
@@ -398,7 +398,7 @@ class TestWeb < Sidekiq::Test
|
|
398
398
|
score = Time.now.to_f
|
399
399
|
msg = { 'class' => 'HardWorker',
|
400
400
|
'args' => ['bob', 1, Time.now.to_f],
|
401
|
-
'jid' =>
|
401
|
+
'jid' => SecureRandom.hex(12) }
|
402
402
|
Sidekiq.redis do |conn|
|
403
403
|
conn.zadd('schedule', score, Sidekiq.dump_json(msg))
|
404
404
|
end
|
@@ -413,7 +413,7 @@ class TestWeb < Sidekiq::Test
|
|
413
413
|
'error_class' => 'RuntimeError',
|
414
414
|
'retry_count' => 0,
|
415
415
|
'failed_at' => Time.now.utc,
|
416
|
-
'jid' =>
|
416
|
+
'jid' => SecureRandom.hex(12) }
|
417
417
|
score = Time.now.to_f
|
418
418
|
Sidekiq.redis do |conn|
|
419
419
|
conn.zadd('retry', score, Sidekiq.dump_json(msg))
|
@@ -429,7 +429,7 @@ class TestWeb < Sidekiq::Test
|
|
429
429
|
'error_class' => 'RuntimeError',
|
430
430
|
'retry_count' => 0,
|
431
431
|
'failed_at' => Time.now.utc,
|
432
|
-
'jid' =>
|
432
|
+
'jid' => SecureRandom.hex(12) }
|
433
433
|
score = Time.now.to_f
|
434
434
|
Sidekiq.redis do |conn|
|
435
435
|
conn.zadd('retry', score, Sidekiq.dump_json(msg))
|
@@ -188,15 +188,16 @@ td form {
|
|
188
188
|
margin-bottom: 0;
|
189
189
|
}
|
190
190
|
|
191
|
-
td.table-checkbox {
|
191
|
+
.table tr > td.table-checkbox, .table tr > th.table-checkbox {
|
192
192
|
padding: 0px;
|
193
193
|
}
|
194
194
|
|
195
|
-
|
195
|
+
table .table-checkbox label {
|
196
196
|
height: 100%;
|
197
197
|
width: 100%;
|
198
|
-
padding:
|
198
|
+
padding: 0px 16px;
|
199
199
|
margin-bottom: 0;
|
200
|
+
line-height: 32px;
|
200
201
|
}
|
201
202
|
|
202
203
|
.navbar .navbar-brand {
|
@@ -897,8 +898,11 @@ img.smallogo {
|
|
897
898
|
background: rgba(255, 255, 255, 0.2);
|
898
899
|
border-radius: 3px;
|
899
900
|
}
|
901
|
+
.code-wrap {
|
902
|
+
white-space: normal;
|
903
|
+
}
|
900
904
|
.args {
|
901
|
-
overflow-y:
|
905
|
+
overflow-y: auto;
|
902
906
|
max-height: 100px;
|
903
907
|
}
|
904
908
|
.args-extended {
|
data/web/views/_job_info.erb
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
<tr>
|
20
20
|
<th><%= t('Arguments') %></th>
|
21
21
|
<td>
|
22
|
-
<code>
|
22
|
+
<code class="code-wrap">
|
23
23
|
<!-- We don't want to truncate any job arguments when viewing a single job's status page -->
|
24
24
|
<div class="args-extended"><%= display_args(job['args'], nil) %></div>
|
25
25
|
</code>
|
data/web/views/retries.erb
CHANGED
@@ -15,8 +15,10 @@
|
|
15
15
|
<table class="table table-striped table-bordered table-white">
|
16
16
|
<thead>
|
17
17
|
<tr>
|
18
|
-
<th width="20px">
|
19
|
-
<
|
18
|
+
<th width="20px" class="table-checkbox">
|
19
|
+
<label>
|
20
|
+
<input type="checkbox" class="check_all" />
|
21
|
+
</label>
|
20
22
|
</th>
|
21
23
|
<th width="25%"><%= t('NextRetry') %></th>
|
22
24
|
<th width="11%"><%= t('RetryCount') %></th>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.17.
|
4
|
+
version: 2.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.0.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redis-namespace
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|