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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3c94aa8a163d8572aaa7c04bc1fbdf0b2bb737c
4
- data.tar.gz: d7cd0118de313f863b5c6ead2163a47e0cb8cdc9
3
+ metadata.gz: 24bfd443535efddca7164e0784c5317d25487673
4
+ data.tar.gz: 24e85e77a30f1e6dba72ae0a965fa63b4b8b5b33
5
5
  SHA512:
6
- metadata.gz: ce15a352e04acb9be28519faf11a2bbac4cc3deec7467abef232a53679cde91d4a60a5f08bf0143cd3ebde20559e8ee112e2ef270332e27fc8a95814eb7df9cd
7
- data.tar.gz: 2ea6a283ea6850816178520608dd37fec6e46ebe72ce933daa02204862f1815d588a02b790b33009c39fe56ff55f90b108f9c445e36875ed8d5f4596c53c4c3a
6
+ metadata.gz: 8b031f54208e373dcf35a2c4da99a8756b6c5cfa8fe984e9bce4841d01240780dac4f052cdef86474788c23f317f9f54415bb3e2ce9cd1de868a621767291ea2
7
+ data.tar.gz: b66143b6db4ba974f8d9846728e109b27c3fb95fe3e8aa5182698e2c539e0a4d729b26da3e776d619b72d5c850c8e45e491cd186394d847f5e3cbb0d75e9479f
@@ -4,17 +4,9 @@ services:
4
4
  rvm:
5
5
  - 1.9.3
6
6
  - jruby-19mode
7
- - rbx-2.1.1
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-2.1.1
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
@@ -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
- HEAD
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 only**
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 only**
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 only** [jonhyman]
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 more information.
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 delay(options={})
25
+ def sidekiq_delay(options={})
26
26
  Proxy.new(DelayedMailer, self, options)
27
27
  end
28
- def delay_for(interval, options={})
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 delay_until(timestamp, options={})
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 delay(options={})
24
+ def sidekiq_delay(options={})
25
25
  Proxy.new(DelayedModel, self, options)
26
26
  end
27
- def delay_for(interval, options={})
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 delay_until(timestamp, options={})
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 delay(options={})
22
+ def sidekiq_delay(options={})
23
23
  Proxy.new(DelayedClass, self, options)
24
24
  end
25
- def delay_for(interval, options={})
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 delay_until(timestamp, options={})
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
@@ -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|
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Sidekiq
2
- VERSION = "2.17.0"
2
+ VERSION = "2.17.1"
3
3
  end
@@ -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.4'
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'
@@ -11,7 +11,7 @@ class TestManager < Sidekiq::Test
11
11
  end
12
12
 
13
13
  it 'assigns work to a processor' do
14
- uow = Minitest::Mock.new
14
+ uow = Object.new
15
15
  processor = Minitest::Mock.new
16
16
  processor.expect(:async, processor, [])
17
17
  processor.expect(:process, nil, [uow])
@@ -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' => 'f39af2a05e8f4b24dbc0f1e4' }
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' => 'f39af2a05e8f4b24dbc0f1e4'}
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' => 'f39af2a05e8f4b24dbc0f1e4'}
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
- td.table-checkbox label {
195
+ table .table-checkbox label {
196
196
  height: 100%;
197
197
  width: 100%;
198
- padding: 8px;
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: scroll;
905
+ overflow-y: auto;
902
906
  max-height: 100px;
903
907
  }
904
908
  .args-extended {
@@ -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>
@@ -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
- <input type="checkbox" class="check_all" />
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.0
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-24 00:00:00.000000000 Z
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.4
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.4
26
+ version: 3.0.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis-namespace
29
29
  requirement: !ruby/object:Gem::Requirement