sidekiq 2.15.1 → 4.2.10
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 +7 -0
- data/.github/contributing.md +32 -0
- data/.github/issue_template.md +9 -0
- data/.gitignore +1 -0
- data/.travis.yml +16 -17
- data/3.0-Upgrade.md +70 -0
- data/4.0-Upgrade.md +53 -0
- data/COMM-LICENSE +56 -44
- data/Changes.md +644 -1
- data/Ent-Changes.md +173 -0
- data/Gemfile +27 -0
- data/LICENSE +1 -1
- data/Pro-2.0-Upgrade.md +138 -0
- data/Pro-3.0-Upgrade.md +44 -0
- data/Pro-Changes.md +457 -3
- data/README.md +46 -29
- data/Rakefile +6 -3
- data/bin/sidekiq +4 -0
- data/bin/sidekiqctl +41 -20
- data/bin/sidekiqload +154 -0
- data/code_of_conduct.md +50 -0
- data/lib/generators/sidekiq/templates/worker.rb.erb +9 -0
- data/lib/generators/sidekiq/templates/worker_spec.rb.erb +6 -0
- data/lib/generators/sidekiq/templates/worker_test.rb.erb +8 -0
- data/lib/generators/sidekiq/worker_generator.rb +49 -0
- data/lib/sidekiq.rb +141 -29
- data/lib/sidekiq/api.rb +540 -106
- data/lib/sidekiq/cli.rb +131 -71
- data/lib/sidekiq/client.rb +168 -96
- data/lib/sidekiq/core_ext.rb +36 -8
- data/lib/sidekiq/exception_handler.rb +20 -28
- data/lib/sidekiq/extensions/action_mailer.rb +25 -5
- data/lib/sidekiq/extensions/active_record.rb +8 -4
- data/lib/sidekiq/extensions/class_methods.rb +9 -5
- data/lib/sidekiq/extensions/generic_proxy.rb +1 -0
- data/lib/sidekiq/fetch.rb +45 -101
- data/lib/sidekiq/launcher.rb +144 -30
- data/lib/sidekiq/logging.rb +69 -12
- data/lib/sidekiq/manager.rb +90 -140
- data/lib/sidekiq/middleware/chain.rb +18 -5
- data/lib/sidekiq/middleware/i18n.rb +9 -2
- data/lib/sidekiq/middleware/server/active_record.rb +1 -1
- data/lib/sidekiq/middleware/server/logging.rb +11 -11
- data/lib/sidekiq/middleware/server/retry_jobs.rb +98 -44
- data/lib/sidekiq/paginator.rb +20 -8
- data/lib/sidekiq/processor.rb +157 -96
- data/lib/sidekiq/rails.rb +109 -5
- data/lib/sidekiq/redis_connection.rb +70 -24
- data/lib/sidekiq/scheduled.rb +122 -50
- data/lib/sidekiq/testing.rb +171 -31
- data/lib/sidekiq/testing/inline.rb +1 -0
- data/lib/sidekiq/util.rb +31 -5
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web.rb +136 -263
- data/lib/sidekiq/web/action.rb +93 -0
- data/lib/sidekiq/web/application.rb +336 -0
- data/lib/sidekiq/web/helpers.rb +278 -0
- data/lib/sidekiq/web/router.rb +100 -0
- data/lib/sidekiq/worker.rb +40 -7
- data/sidekiq.gemspec +18 -14
- data/web/assets/images/favicon.ico +0 -0
- data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
- data/web/assets/javascripts/application.js +67 -19
- data/web/assets/javascripts/dashboard.js +138 -29
- data/web/assets/stylesheets/application.css +267 -406
- data/web/assets/stylesheets/bootstrap.css +4 -8
- data/web/locales/cs.yml +78 -0
- data/web/locales/da.yml +9 -1
- data/web/locales/de.yml +18 -9
- data/web/locales/el.yml +68 -0
- data/web/locales/en.yml +19 -4
- data/web/locales/es.yml +10 -1
- data/web/locales/fa.yml +79 -0
- data/web/locales/fr.yml +50 -32
- data/web/locales/hi.yml +75 -0
- data/web/locales/it.yml +27 -18
- data/web/locales/ja.yml +27 -12
- data/web/locales/ko.yml +8 -3
- data/web/locales/{no.yml → nb.yml} +19 -5
- data/web/locales/nl.yml +8 -3
- data/web/locales/pl.yml +0 -1
- data/web/locales/pt-br.yml +11 -4
- data/web/locales/pt.yml +8 -1
- data/web/locales/ru.yml +39 -21
- data/web/locales/sv.yml +68 -0
- data/web/locales/ta.yml +75 -0
- data/web/locales/uk.yml +76 -0
- data/web/locales/zh-cn.yml +68 -0
- data/web/locales/zh-tw.yml +68 -0
- data/web/views/_footer.erb +17 -0
- data/web/views/_job_info.erb +72 -60
- data/web/views/_nav.erb +58 -25
- data/web/views/_paging.erb +5 -5
- data/web/views/_poll_link.erb +7 -0
- data/web/views/_summary.erb +20 -14
- data/web/views/busy.erb +94 -0
- data/web/views/dashboard.erb +34 -21
- data/web/views/dead.erb +34 -0
- data/web/views/layout.erb +8 -30
- data/web/views/morgue.erb +75 -0
- data/web/views/queue.erb +37 -30
- data/web/views/queues.erb +26 -20
- data/web/views/retries.erb +60 -47
- data/web/views/retry.erb +23 -19
- data/web/views/scheduled.erb +39 -35
- data/web/views/scheduled_job_info.erb +2 -1
- metadata +152 -195
- data/Contributing.md +0 -29
- data/config.ru +0 -18
- data/lib/sidekiq/actor.rb +0 -7
- data/lib/sidekiq/capistrano.rb +0 -54
- data/lib/sidekiq/yaml_patch.rb +0 -21
- data/test/config.yml +0 -11
- data/test/env_based_config.yml +0 -11
- data/test/fake_env.rb +0 -0
- data/test/helper.rb +0 -42
- data/test/test_api.rb +0 -341
- data/test/test_cli.rb +0 -326
- data/test/test_client.rb +0 -211
- data/test/test_exception_handler.rb +0 -124
- data/test/test_extensions.rb +0 -105
- data/test/test_fetch.rb +0 -44
- data/test/test_manager.rb +0 -83
- data/test/test_middleware.rb +0 -135
- data/test/test_processor.rb +0 -160
- data/test/test_redis_connection.rb +0 -97
- data/test/test_retry.rb +0 -306
- data/test/test_scheduled.rb +0 -86
- data/test/test_scheduling.rb +0 -47
- data/test/test_sidekiq.rb +0 -37
- data/test/test_testing.rb +0 -82
- data/test/test_testing_fake.rb +0 -265
- data/test/test_testing_inline.rb +0 -92
- data/test/test_util.rb +0 -18
- data/test/test_web.rb +0 -372
- data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
- data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
- data/web/assets/images/status/active.png +0 -0
- data/web/assets/images/status/idle.png +0 -0
- data/web/assets/javascripts/locales/README.md +0 -27
- data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
- data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
- data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.cz.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
- data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
- data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
- data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
- data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
- data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
- data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
- data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
- data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.no.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
- data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
- data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
- data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
- data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
- data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
- data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
- data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
- data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
- data/web/assets/javascripts/locales/jquery.timeago.zh-CN.js +0 -20
- data/web/assets/javascripts/locales/jquery.timeago.zh-TW.js +0 -20
- data/web/views/_poll.erb +0 -14
- data/web/views/_workers.erb +0 -29
- data/web/views/index.erb +0 -16
data/Ent-Changes.md
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
Sidekiq Enterprise Changelog
|
2
|
+
=======================
|
3
|
+
|
4
|
+
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
|
+
|
6
|
+
1.5.2
|
7
|
+
-------------
|
8
|
+
|
9
|
+
- Fix encrypted arguments double-encrypted by retry or rate limiting [#3368]
|
10
|
+
- Fix leak in concurrent rate limiter, run this in Rails console to clean up existing data [#3323]
|
11
|
+
```ruby
|
12
|
+
expiry = 1.month.to_i; Sidekiq::Limiter.redis { |c| c.scan_each(match: "lmtr-cfree-*") { |key| c.expire(key, expiry) } }
|
13
|
+
```
|
14
|
+
|
15
|
+
1.5.1
|
16
|
+
-------------
|
17
|
+
|
18
|
+
- Fix issue with census startup when not using Bundler configuration for
|
19
|
+
source credentials.
|
20
|
+
|
21
|
+
1.5.0
|
22
|
+
-------------
|
23
|
+
|
24
|
+
- Add new web authorization API [#3251]
|
25
|
+
- Update all sidekiqswarm env vars to use SIDEKIQ\_ prefix [#3218]
|
26
|
+
- Add census reporting, the leader will ping contribsys nightly with aggregate usage metrics
|
27
|
+
|
28
|
+
1.4.0
|
29
|
+
-------------
|
30
|
+
|
31
|
+
- No functional changes, require latest Sidekiq and Sidekiq Pro versions
|
32
|
+
|
33
|
+
1.3.2
|
34
|
+
-------------
|
35
|
+
|
36
|
+
- Upgrade encryption to use OpenSSL's more secure GCM mode. [#3060]
|
37
|
+
|
38
|
+
1.3.1
|
39
|
+
-------------
|
40
|
+
|
41
|
+
- Fix multi-process memory monitoring on CentOS 6.x [#3063]
|
42
|
+
- Polish the new encryption feature a bit.
|
43
|
+
|
44
|
+
1.3.0
|
45
|
+
-------------
|
46
|
+
|
47
|
+
- **BETA** [New encryption feature](https://github.com/mperham/sidekiq/wiki/Ent-Encryption)
|
48
|
+
which automatically encrypts the last argument of a Worker, aka the secret bag.
|
49
|
+
|
50
|
+
1.2.4
|
51
|
+
-------------
|
52
|
+
|
53
|
+
- Fix issue causing some minutely jobs to execute every other minute.
|
54
|
+
- Log a warning if slow periodic processing causes us to miss a clock tick.
|
55
|
+
|
56
|
+
1.2.3
|
57
|
+
-------------
|
58
|
+
|
59
|
+
- Periodic jobs could stop executing until process restart if Redis goes down [#3047]
|
60
|
+
|
61
|
+
1.2.2
|
62
|
+
-------------
|
63
|
+
|
64
|
+
- Add API to check if a unique lock is present. See [#2932] for details.
|
65
|
+
- Tune concurrent limiters to minimize thread thrashing under heavy contention. [#2944]
|
66
|
+
- Add option for tuning which Bundler groups get preloaded with `sidekiqswarm` [#3025]
|
67
|
+
```
|
68
|
+
SIDEKIQ_PRELOAD=default,production bin/sidekiqswarm ...
|
69
|
+
# Use an empty value for maximum application compatibility
|
70
|
+
SIDEKIQ_PRELOAD= bin/sidekiqswarm ...
|
71
|
+
```
|
72
|
+
|
73
|
+
1.2.1
|
74
|
+
-------------
|
75
|
+
|
76
|
+
- Multi-Process mode can now monitor the RSS memory of children and
|
77
|
+
restart any that grow too large. To limit children to 1GB each:
|
78
|
+
```
|
79
|
+
MAXMEM_KB=1048576 COUNT=2 bundle exec sidekiqswarm ...
|
80
|
+
```
|
81
|
+
|
82
|
+
1.2.0
|
83
|
+
-------------
|
84
|
+
|
85
|
+
- **NEW FEATURE** Multi-process mode! Sidekiq Enterprise can now fork multiple worker
|
86
|
+
processes, enabling significant memory savings. See the [wiki
|
87
|
+
documentation](https://github.com/mperham/sidekiq/wiki/Ent-Multi-Process) for details.
|
88
|
+
|
89
|
+
|
90
|
+
0.7.10
|
91
|
+
-------------
|
92
|
+
|
93
|
+
- More precise gemspec dependency versioning
|
94
|
+
|
95
|
+
1.1.0
|
96
|
+
-------------
|
97
|
+
|
98
|
+
- **NEW FEATURE** Historical queue metrics, [documented in the wiki](https://github.com/mperham/sidekiq/wiki/Ent-Historical-Metrics) [#2719]
|
99
|
+
|
100
|
+
0.7.9, 1.0.2
|
101
|
+
-------------
|
102
|
+
|
103
|
+
- Window limiters can now accept arbitrary window sizes [#2686]
|
104
|
+
- Fix race condition in window limiters leading to non-stop OverLimit [#2704]
|
105
|
+
- Fix invalid overage counts when nesting concurrent limiters
|
106
|
+
|
107
|
+
1.0.1
|
108
|
+
----------
|
109
|
+
|
110
|
+
- Fix crash in periodic subsystem when a follower shuts down, thanks
|
111
|
+
to @justinko for reporting.
|
112
|
+
|
113
|
+
1.0.0
|
114
|
+
----------
|
115
|
+
|
116
|
+
- Enterprise 1.x targets Sidekiq 4.x.
|
117
|
+
- Rewrite several features to remove Celluloid dependency. No
|
118
|
+
functional changes.
|
119
|
+
|
120
|
+
0.7.8
|
121
|
+
----------
|
122
|
+
|
123
|
+
- Fix `unique_for: false` [#2658]
|
124
|
+
|
125
|
+
|
126
|
+
0.7.7
|
127
|
+
----------
|
128
|
+
|
129
|
+
- Enterprise 0.x targets Sidekiq 3.x.
|
130
|
+
- Fix racy shutdown event which could lead to disappearing periodic
|
131
|
+
jobs, requires Sidekiq >= 3.5.3.
|
132
|
+
- Add new :leader event which is fired when a process gains leadership.
|
133
|
+
|
134
|
+
0.7.6
|
135
|
+
----------
|
136
|
+
|
137
|
+
- Redesign how overrated jobs are rescheduled to avoid creating new
|
138
|
+
jobs. [#2619]
|
139
|
+
|
140
|
+
0.7.5
|
141
|
+
----------
|
142
|
+
|
143
|
+
- Fix dynamic creation of concurrent limiters [#2617]
|
144
|
+
|
145
|
+
0.7.4
|
146
|
+
----------
|
147
|
+
- Add additional check to prevent duplicate periodic job creation
|
148
|
+
- Allow user-specified TTLs for rate limiters [#2607]
|
149
|
+
- Paginate rate limiter index page [#2606]
|
150
|
+
|
151
|
+
0.7.3
|
152
|
+
----------
|
153
|
+
|
154
|
+
- Rework `Sidekiq::Limiter` redis handling to match global redis handling.
|
155
|
+
- Allow user to customize rate limit backoff logic and handle custom
|
156
|
+
rate limit errors.
|
157
|
+
- Fix scalability issue with Limiter index page.
|
158
|
+
|
159
|
+
0.7.2
|
160
|
+
----------
|
161
|
+
|
162
|
+
- Fix typo which prevented limiters with '0' in their names.
|
163
|
+
|
164
|
+
0.7.1
|
165
|
+
----------
|
166
|
+
|
167
|
+
- Fix issue where unique scheduled jobs can't be enqueued upon schedule
|
168
|
+
due to the existing unique lock. [#2499]
|
169
|
+
|
170
|
+
0.7.0
|
171
|
+
----------
|
172
|
+
|
173
|
+
Initial release.
|
data/Gemfile
CHANGED
@@ -1,2 +1,29 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
|
+
|
4
|
+
gem 'rails', '>= 5.0.1'
|
5
|
+
gem "hiredis"
|
6
|
+
gem 'simplecov'
|
7
|
+
gem 'minitest'
|
8
|
+
#gem 'minitest-utils'
|
9
|
+
gem 'toxiproxy'
|
10
|
+
|
11
|
+
platforms :rbx do
|
12
|
+
gem 'rubysl', '~> 2.0' # if using anything in the ruby standard library
|
13
|
+
gem 'psych' # if using yaml
|
14
|
+
gem 'rubinius-developer_tools' # if using any of coverage, debugger, profiler
|
15
|
+
end
|
16
|
+
|
17
|
+
platforms :ruby do
|
18
|
+
gem 'sqlite3'
|
19
|
+
end
|
20
|
+
|
21
|
+
platforms :mri do
|
22
|
+
gem 'pry-byebug'
|
23
|
+
gem 'ruby-prof'
|
24
|
+
end
|
25
|
+
|
26
|
+
#platforms :jruby do
|
27
|
+
#gem 'jruby-openssl'
|
28
|
+
#gem 'activerecord-jdbcsqlite3-adapter'
|
29
|
+
#end
|
data/LICENSE
CHANGED
data/Pro-2.0-Upgrade.md
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
# Upgrading to Sidekiq Pro 2.0
|
2
|
+
|
3
|
+
Sidekiq Pro 2.0 allows nested batches for more complex job workflows
|
4
|
+
and provides a new reliable scheduler which uses Lua to guarantee
|
5
|
+
atomicity and much higher performance.
|
6
|
+
|
7
|
+
It also removes deprecated APIs, changes the batch data format and
|
8
|
+
how features are activated. Read carefully to ensure your upgrade goes
|
9
|
+
smoothly.
|
10
|
+
|
11
|
+
Sidekiq Pro 2.0 requires Sidekiq 3.3.2 or greater. Redis 2.8 is
|
12
|
+
recommended; Redis 2.4 or 2.6 will work but some functionality will not be
|
13
|
+
available.
|
14
|
+
|
15
|
+
**Note that you CANNOT go back to Pro 1.x once you've created batches
|
16
|
+
with 2.x. The new batches will not process correctly with 1.x.**
|
17
|
+
|
18
|
+
**If you are on a version of Sidekiq Pro <1.5, you should upgrade to the
|
19
|
+
latest 1.x version and run it for a week before upgrading to 2.0.**
|
20
|
+
|
21
|
+
## Nested Batches
|
22
|
+
|
23
|
+
Batches can now be nested within the `jobs` method.
|
24
|
+
This feature enables Sidekiq Pro to handle workflow processing of any size
|
25
|
+
and complexity!
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
a = Sidekiq::Batch.new
|
29
|
+
a.on(:success, SomeCallback)
|
30
|
+
a.jobs do
|
31
|
+
SomeWork.perform_async
|
32
|
+
|
33
|
+
b = Sidekiq::Batch.new
|
34
|
+
b.on(:success, MyCallback)
|
35
|
+
b.jobs do
|
36
|
+
OtherWork.perform_async
|
37
|
+
end
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
Parent batch callbacks are not processed until all child batch callbacks have
|
42
|
+
run successfully. In the example above, `MyCallback` will always fire
|
43
|
+
before `SomeCallback` because `b` is considered a child of `a`.
|
44
|
+
|
45
|
+
Of course you can dynamically add child batches while a batch job is executing.
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
def perform(*args)
|
49
|
+
do_something(args)
|
50
|
+
|
51
|
+
if more_work?
|
52
|
+
# Sidekiq::Worker#batch returns the Batch this job is part of.
|
53
|
+
batch.jobs do
|
54
|
+
b = Sidekiq::Batch.new
|
55
|
+
b.on(:success, MyCallback)
|
56
|
+
b.jobs do
|
57
|
+
OtherWork.perform_async
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
More context: [#1485]
|
65
|
+
|
66
|
+
## Batch Data
|
67
|
+
|
68
|
+
The batch data model was overhauled. Batch data should take
|
69
|
+
significantly less space in Redis now. A simple benchmark shows 25%
|
70
|
+
savings but real world savings should be even greater.
|
71
|
+
|
72
|
+
* Batch 2.x BIDs are 14 character URL-safe Base64-encoded strings, e.g.
|
73
|
+
"vTF1-9QvLPnREQ". Batch 1.x BIDs were 16 character hex-encoded
|
74
|
+
strings, e.g. "4a3fc67d30370edf".
|
75
|
+
* In 1.x, batch data was not removed until it naturally expired in Redis.
|
76
|
+
In 2.x, all data for a batch is removed from Redis once the batch has
|
77
|
+
run any success callbacks.
|
78
|
+
* Because of the former point, batch expiry is no longer a concern.
|
79
|
+
Batch expiry is hardcoded to 30 days and is no longer user-tunable.
|
80
|
+
* Failed batch jobs no longer automatically store any associated
|
81
|
+
backtrace in Redis.
|
82
|
+
|
83
|
+
**There's no data migration required. Sidekiq Pro 2.0 transparently handles
|
84
|
+
both old and new format.**
|
85
|
+
|
86
|
+
More context: [#2130]
|
87
|
+
|
88
|
+
## Reliability
|
89
|
+
|
90
|
+
2.0 brings a new reliable scheduler which uses Lua inside Redis so enqueuing
|
91
|
+
scheduled jobs is atomic. Benchmarks show it 50x faster when enqueuing
|
92
|
+
lots of jobs.
|
93
|
+
|
94
|
+
**Two caveats**:
|
95
|
+
- Client-side middleware is not executed
|
96
|
+
for each job when enqueued with the reliable scheduler. No Sidekiq or
|
97
|
+
Sidekiq Pro functionality is affected by this change but some 3rd party
|
98
|
+
plugins might be.
|
99
|
+
- The Lua script used inside the reliable scheduler is not safe for use
|
100
|
+
with Redis Cluster or other multi-master Redis solutions.
|
101
|
+
It is safe to use with Redis Sentinel or a typical master/slave replication setup.
|
102
|
+
|
103
|
+
**You no longer require anything to use the Reliability features.**
|
104
|
+
|
105
|
+
* Activate reliable fetch and/or the new reliable scheduler:
|
106
|
+
```ruby
|
107
|
+
Sidekiq.configure_server do |config|
|
108
|
+
config.reliable_fetch!
|
109
|
+
config.reliable_scheduler!
|
110
|
+
end
|
111
|
+
```
|
112
|
+
* Activate reliable push:
|
113
|
+
```ruby
|
114
|
+
Sidekiq::Client.reliable_push!
|
115
|
+
```
|
116
|
+
|
117
|
+
More context: [#2130]
|
118
|
+
|
119
|
+
## Other Changes
|
120
|
+
|
121
|
+
* You must require `sidekiq/pro/notifications` if you want to use the
|
122
|
+
existing notification schemes. I don't recommend using them as the
|
123
|
+
newer-style `Sidekiq::Batch#on` method is simpler and more flexible.
|
124
|
+
* Several classes have been renamed. Generally these classes are ones
|
125
|
+
you should not need to require/use in your own code, e.g. the Batch
|
126
|
+
middleware.
|
127
|
+
* You can add `attr_accessor :jid` to a Batch callback class and Sidekiq
|
128
|
+
Pro will set it to the jid of the callback job. [#2178]
|
129
|
+
* There's now an official API to iterate all known Batches [#2191]
|
130
|
+
```ruby
|
131
|
+
Sidekiq::BatchSet.new.each {|status| p status.bid }
|
132
|
+
```
|
133
|
+
* The Web UI now shows the Sidekiq Pro version in the footer. [#1991]
|
134
|
+
|
135
|
+
## Thanks
|
136
|
+
|
137
|
+
Adam Prescott, Luke van der Hoeven and Jon Hyman all provided valuable
|
138
|
+
feedback during the release process. Thank you guys!
|
data/Pro-3.0-Upgrade.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Welcome to Sidekiq Pro 3.0!
|
2
|
+
|
3
|
+
Sidekiq Pro 3.0 is designed to work with Sidekiq 4.0.
|
4
|
+
|
5
|
+
## What's New
|
6
|
+
|
7
|
+
* **Redis 2.8.0 or greater is required.** Redis 2.8 was released two years
|
8
|
+
ago and contains **many** useful features which Sidekiq couldn't
|
9
|
+
leverage until now. **Redis 3.0.3 or greater is recommended** for large
|
10
|
+
scale use.
|
11
|
+
|
12
|
+
* Sidekiq Pro no longer uses Celluloid. If your application code uses Celluloid,
|
13
|
+
you will need to pull it in yourself.
|
14
|
+
|
15
|
+
* Pausing and unpausing queues is now instantaneous, no more polling!
|
16
|
+
|
17
|
+
* Reliable fetch has been re-implemented due to the fetch changes in
|
18
|
+
Sidekiq 4.0.
|
19
|
+
|
20
|
+
* Support for platforms without persistent hostnames. Since the reliable\_fetch
|
21
|
+
algorithm requires a persistent hostname, an alternative reliability
|
22
|
+
algorithm is now available for platforms like Heroku and Docker:
|
23
|
+
```ruby
|
24
|
+
Sidekiq.configure_server do |config|
|
25
|
+
config.timed_fetch!
|
26
|
+
end
|
27
|
+
```
|
28
|
+
The wiki contains [much more detail about each reliability option](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server).
|
29
|
+
|
30
|
+
* The old 'sidekiq/notifications' features have been removed.
|
31
|
+
|
32
|
+
## Upgrade
|
33
|
+
|
34
|
+
First, make sure you are using Redis 2.8 or greater. Next:
|
35
|
+
|
36
|
+
* Upgrade to the latest Sidekiq Pro 2.x.
|
37
|
+
```ruby
|
38
|
+
gem 'sidekiq-pro', '< 3'
|
39
|
+
```
|
40
|
+
* Fix any deprecation warnings you see.
|
41
|
+
* Upgrade to 3.x.
|
42
|
+
```ruby
|
43
|
+
gem 'sidekiq-pro', '< 4'
|
44
|
+
```
|
data/Pro-Changes.md
CHANGED
@@ -1,7 +1,461 @@
|
|
1
1
|
Sidekiq Pro Changelog
|
2
2
|
=======================
|
3
3
|
|
4
|
-
Please see http://sidekiq.org/
|
4
|
+
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
|
+
|
6
|
+
HEAD
|
7
|
+
---------
|
8
|
+
|
9
|
+
- Make Batch UI progress bar more friendly to the colorblind [#3387]
|
10
|
+
|
11
|
+
3.4.5
|
12
|
+
---------
|
13
|
+
|
14
|
+
- Fix potential job loss with reliable scheduler when lots of jobs are scheduled
|
15
|
+
at precisely the same time. Thanks to raivil for his hard work in
|
16
|
+
reproducing the bug. [#3371]
|
17
|
+
|
18
|
+
3.4.4
|
19
|
+
---------
|
20
|
+
|
21
|
+
- Optimize super\_fetch shutdown to restart jobs quicker [#3249]
|
22
|
+
|
23
|
+
3.4.3
|
24
|
+
---------
|
25
|
+
|
26
|
+
- Limit reliable scheduler to enqueue up to 100 jobs per call, minimizing Redis latency [#3332]
|
27
|
+
- Fix bug in super\_fetch logic for queues with `_` in the name [#3339]
|
28
|
+
|
29
|
+
3.4.2
|
30
|
+
---------
|
31
|
+
|
32
|
+
- Add `Batch::Status#invalidated?` API which returns true if any/all
|
33
|
+
JIDs were invalidated within the batch. [#3326]
|
34
|
+
|
35
|
+
3.4.1
|
36
|
+
---------
|
37
|
+
|
38
|
+
- Allow super\_fetch's orphan job check to happen as often as every hour [#3273]
|
39
|
+
- Officially deprecate reliable\_fetch algorithm, I now recommend you use `super_fetch` instead:
|
40
|
+
```ruby
|
41
|
+
Sidekiq.configure_server do |config|
|
42
|
+
config.super_fetch!
|
43
|
+
end
|
44
|
+
```
|
45
|
+
Also note that Sidekiq's `-i/--index` option is no longer used/relevant with super\_fetch.
|
46
|
+
- Don't display "Delete/Retry All" buttons when filtering in Web UI [#3243]
|
47
|
+
- Reimplement Sidekiq::JobSet#find\_job with ZSCAN [#3197]
|
48
|
+
|
49
|
+
3.4.0
|
50
|
+
---------
|
51
|
+
|
52
|
+
- Introducing the newest reliable fetching algorithm: `super_fetch`! This
|
53
|
+
algorithm will replace reliable\_fetch in Pro 4.0. super\_fetch is
|
54
|
+
bullet-proof across all environments, no longer requiring stable
|
55
|
+
hostnames or an index to be set per-process. [#3077]
|
56
|
+
```ruby
|
57
|
+
Sidekiq.configure_server do |config|
|
58
|
+
config.super_fetch!
|
59
|
+
end
|
60
|
+
```
|
61
|
+
Thank you to @jonhyman for code review and the Sidekiq Pro customers that
|
62
|
+
beta tested super\_fetch.
|
63
|
+
|
64
|
+
3.3.3
|
65
|
+
---------
|
66
|
+
|
67
|
+
- Update Web UI extension to work with Sidekiq 4.2.0's new Web UI. [#3075]
|
68
|
+
|
69
|
+
3.3.2
|
70
|
+
---------
|
71
|
+
|
72
|
+
- Minimize batch memory usage after success [#3083]
|
73
|
+
- Extract batch's 24 hr linger expiry to a LINGER constant so it can be tuned. [#3011]
|
74
|
+
|
75
|
+
3.3.1
|
76
|
+
---------
|
77
|
+
|
78
|
+
- If environment is unset, treat it as development so reliable\_fetch works as before 3.2.2.
|
79
|
+
|
80
|
+
3.3.0
|
81
|
+
---------
|
82
|
+
|
83
|
+
- Don't delete batches immediately upon success but set a 24 hr expiry, this allows
|
84
|
+
Sidekiq::Batch::Status#poll to work, even after batch success. [#3011]
|
85
|
+
- New `Sidekiq::PendingSet#destroy(jid)` API to remove poison pill jobs [#3015]
|
86
|
+
|
87
|
+
3.2.2
|
88
|
+
---------
|
89
|
+
|
90
|
+
- A default value for -i is only set in development now, staging or
|
91
|
+
other environments must set an index if you wish to use reliable\_fetch. [#2971]
|
92
|
+
- Fix nil dereference when checking for jobs over timeout in timed\_fetch
|
93
|
+
|
94
|
+
|
95
|
+
3.2.1
|
96
|
+
---------
|
97
|
+
|
98
|
+
- timed\_fetch now works with namespaces. [ryansch]
|
99
|
+
|
100
|
+
|
101
|
+
3.2.0
|
102
|
+
---------
|
103
|
+
|
104
|
+
- Fixed detection of missing batches, `NoSuchBatch` should be raised
|
105
|
+
properly now if `Sidekiq::Batch.new(bid)` is called on a batch no
|
106
|
+
longer in Redis.
|
107
|
+
- Remove support for Pro 1.x format batches. This version will no
|
108
|
+
longer seamlessly process batches created with Sidekiq Pro 1.x.
|
109
|
+
As always, upgrade one major version at a time to ensure a smooth
|
110
|
+
transition.
|
111
|
+
- Fix edge case where a parent batch could expire before a child batch
|
112
|
+
was finished processing, leading to missing batches [#2889]
|
113
|
+
|
114
|
+
2.1.5
|
115
|
+
---------
|
116
|
+
|
117
|
+
- Fix edge case where a parent batch could expire before a child batch
|
118
|
+
was finished processing, leading to missing batches [#2889]
|
119
|
+
|
120
|
+
3.1.0
|
121
|
+
---------
|
122
|
+
|
123
|
+
- New container-friendly fetch algorithm: `timed_fetch`. See the
|
124
|
+
[wiki documentation](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server)
|
125
|
+
for trade offs between the two reliability options. You should
|
126
|
+
use this if you are on Heroku, Docker, Amazon ECS or EBS or
|
127
|
+
another container-based system.
|
128
|
+
|
129
|
+
|
130
|
+
3.0.6
|
131
|
+
---------
|
132
|
+
|
133
|
+
- Fix race condition on reliable fetch shutdown
|
134
|
+
|
135
|
+
3.0.5
|
136
|
+
---------
|
137
|
+
|
138
|
+
- Statsd metrics now account for ActiveJob class names
|
139
|
+
- Allow reliable fetch internals to be overridden [jonhyman]
|
140
|
+
|
141
|
+
3.0.4
|
142
|
+
---------
|
143
|
+
|
144
|
+
- Queue pausing no longer requires reliable fetch. [#2786]
|
145
|
+
|
146
|
+
3.0.3, 2.1.4
|
147
|
+
------------
|
148
|
+
|
149
|
+
- Convert Lua-based `Sidekiq::Queue#delete_by_class` to Ruby-based, to
|
150
|
+
avoid O(N^2) performance and possible Redis failure. [#2806]
|
151
|
+
|
152
|
+
3.0.2
|
153
|
+
-----------
|
154
|
+
|
155
|
+
- Make job registration with batch part of the atomic push so batch
|
156
|
+
metadata can't get out of sync with the job data. [#2714]
|
157
|
+
|
158
|
+
3.0.1
|
159
|
+
-----------
|
160
|
+
|
161
|
+
- Remove a number of Redis version checks since we can assume 2.8+ now.
|
162
|
+
- Fix expiring jobs client middleware not loaded on server
|
163
|
+
|
164
|
+
3.0.0
|
165
|
+
-----------
|
166
|
+
|
167
|
+
- See the [Pro 3.0 release notes](Pro-3.0-Upgrade.md).
|
168
|
+
|
169
|
+
2.1.3
|
170
|
+
-----------
|
171
|
+
|
172
|
+
- Don't enable strict priority if using weighted queueing like `-q a,1 -q b,1`
|
173
|
+
- Safer JSON mangling in Lua [#2639]
|
174
|
+
|
175
|
+
2.1.2
|
176
|
+
-----------
|
177
|
+
|
178
|
+
- Lock Sidekiq Pro 2.x to Sidekiq 3.x.
|
179
|
+
|
180
|
+
2.1.1
|
181
|
+
-----------
|
182
|
+
|
183
|
+
- Make ShardSet lazier so Redis can first be initialized at startup. [#2603]
|
184
|
+
|
185
|
+
|
186
|
+
2.1.0
|
187
|
+
-----------
|
188
|
+
|
189
|
+
- Explicit support for sharding batches. You list your Redis shards and
|
190
|
+
Sidekiq Pro will randomly spread batches across the shards. The BID
|
191
|
+
will indicate which shard contains the batch data. Jobs within a
|
192
|
+
batch may be spread across all shards too. [#2548, jonhyman]
|
193
|
+
- Officially deprecate Sidekiq::Notifications code. Notifications have
|
194
|
+
been undocumented for months now. [#2575]
|
195
|
+
|
196
|
+
|
197
|
+
2.0.8
|
198
|
+
-----------
|
199
|
+
|
200
|
+
- Fix reliable scheduler mangling large numeric arguments. Lua's CJSON
|
201
|
+
library cannot accurately encode numbers larger than 14 digits! [#2478]
|
202
|
+
|
203
|
+
2.0.7
|
204
|
+
-----------
|
205
|
+
|
206
|
+
- Optimize delete of enormous batches (100,000s of jobs) [#2458]
|
207
|
+
|
208
|
+
2.0.6, 1.9.3
|
209
|
+
--------------
|
210
|
+
|
211
|
+
- CSRF protection in Sidekiq 3.4.2 broke job filtering in the Web UI [#2442]
|
212
|
+
- Sidekiq Pro 1.x is now limited to Sidekiq < 3.5.0.
|
213
|
+
|
214
|
+
2.0.5
|
215
|
+
-----------
|
216
|
+
|
217
|
+
- Atomic scheduler now sets `enqueued_at` [#2414]
|
218
|
+
- Batches now account for jobs which are stopped by client middleware [#2406]
|
219
|
+
- Ignore redundant calls to `Sidekiq::Client.reliable_push!` [#2408]
|
220
|
+
|
221
|
+
2.0.4
|
222
|
+
-----------
|
223
|
+
|
224
|
+
- Reliable push now supports sharding [#2409]
|
225
|
+
- Reliable push now only catches Redis exceptions [#2307]
|
226
|
+
|
227
|
+
2.0.3
|
228
|
+
-----------
|
229
|
+
|
230
|
+
- Display Batch callback data on the Batch details page. [#2347]
|
231
|
+
- Fix incompatibility with Pro Web and Rack middleware. [#2344] Thank
|
232
|
+
you to Jason Clark for the tip on how to fix it.
|
233
|
+
|
234
|
+
2.0.2
|
235
|
+
-----------
|
236
|
+
|
237
|
+
- Multiple Web UIs can now run in the same process. [#2267] If you have
|
238
|
+
multiple Redis shards, you can mount UIs for all in the same process:
|
239
|
+
```ruby
|
240
|
+
POOL1 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6379/0") }
|
241
|
+
POOL2 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6378/0") }
|
242
|
+
|
243
|
+
mount Sidekiq::Pro::Web => '/sidekiq' # default
|
244
|
+
mount Sidekiq::Pro::Web.with(redis_pool: POOL1), at: '/sidekiq1', as: 'sidekiq1' # shard1
|
245
|
+
mount Sidekiq::Pro::Web.with(redis_pool: POOL2), at: '/sidekiq2', as: 'sidekiq2' # shard2
|
246
|
+
```
|
247
|
+
- **SECURITY** Fix batch XSS in error data. Thanks to moneybird.com for
|
248
|
+
reporting the issue.
|
249
|
+
|
250
|
+
2.0.1
|
251
|
+
-----------
|
252
|
+
|
253
|
+
- Add `batch.callback_queue` so batch callbacks can use a higher
|
254
|
+
priority queue than jobs. [#2200]
|
255
|
+
- Gracefully recover if someone runs `SCRIPT FLUSH` on Redis. [#2240]
|
256
|
+
- Ignore errors when attempting `bulk_requeue`, allowing clean shutdown
|
257
|
+
|
258
|
+
2.0.0
|
259
|
+
-----------
|
260
|
+
|
261
|
+
- See [the Upgrade Notes](Pro-2.0-Upgrade.md) for detailed notes.
|
262
|
+
|
263
|
+
1.9.2
|
264
|
+
-----------
|
265
|
+
|
266
|
+
- As of 1/1/2015, Sidekiq Pro is hosted on a new dedicated server.
|
267
|
+
Happy new year and let's hope for 100% uptime!
|
268
|
+
- Fix bug in reliable\_fetch where jobs could be duplicated if a Sidekiq
|
269
|
+
process crashed and you were using weighted queues. [#2120]
|
270
|
+
|
271
|
+
1.9.1
|
272
|
+
-----------
|
273
|
+
|
274
|
+
- **SECURITY** Fix XSS in batch description, thanks to intercom.io for reporting the
|
275
|
+
issue. If you don't use batch descriptions, you don't need the fix.
|
276
|
+
|
277
|
+
1.9.0
|
278
|
+
-----------
|
279
|
+
|
280
|
+
- Add new expiring jobs feature [#1982]
|
281
|
+
- Show batch expiration on Batch details page [#1981]
|
282
|
+
- Add '$' batch success token to the pubsub support. [#1953]
|
283
|
+
|
284
|
+
|
285
|
+
1.8.0
|
286
|
+
-----------
|
287
|
+
|
288
|
+
- Fix race condition where Batches can complete
|
289
|
+
before they have been fully defined or only half-defined. Requires
|
290
|
+
Sidekiq 3.2.3. [#1919]
|
291
|
+
|
292
|
+
|
293
|
+
1.7.6
|
294
|
+
-----------
|
295
|
+
|
296
|
+
- Quick release to verify #1919
|
297
|
+
|
298
|
+
|
299
|
+
1.7.5
|
300
|
+
-----------
|
301
|
+
|
302
|
+
- Fix job filtering within the Dead tab.
|
303
|
+
- Add APIs and wiki documentation for invalidating jobs within a batch.
|
304
|
+
|
305
|
+
|
306
|
+
1.7.4
|
307
|
+
-----------
|
308
|
+
|
309
|
+
- Awesome ANSI art startup banner!
|
310
|
+
|
311
|
+
|
312
|
+
1.7.3
|
313
|
+
-----------
|
314
|
+
|
315
|
+
- Batch callbacks should use the same queue as the associated jobs.
|
316
|
+
|
317
|
+
1.7.2
|
318
|
+
-----------
|
319
|
+
|
320
|
+
- **DEPRECATION** Use `Batch#on(:complete)` instead of `Batch#notify`.
|
321
|
+
The specific Campfire, HipChat, email and other notification schemes
|
322
|
+
will be removed in 2.0.0.
|
323
|
+
- Remove batch from UI when successful. [#1745]
|
324
|
+
- Convert batch callbacks to be asynchronous jobs for error handling [#1744]
|
325
|
+
|
326
|
+
1.7.1
|
327
|
+
-----------
|
328
|
+
|
329
|
+
- Fix for paused queues being processed for a few seconds when starting
|
330
|
+
a new Sidekiq process.
|
331
|
+
- Add a 5 sec delay when starting reliable fetch on Heroku to minimize
|
332
|
+
any duplicate job processing with another process shutting down.
|
333
|
+
|
334
|
+
1.7.0
|
335
|
+
-----------
|
336
|
+
|
337
|
+
- Add ability to pause reliable queues via API.
|
338
|
+
```ruby
|
339
|
+
q = Sidekiq::Queue.new("critical")
|
340
|
+
q.pause!
|
341
|
+
q.paused? # => true
|
342
|
+
q.unpause!
|
343
|
+
```
|
344
|
+
|
345
|
+
Sidekiq polls Redis every 10 seconds for paused queues so pausing will take
|
346
|
+
a few seconds to take effect.
|
347
|
+
|
348
|
+
1.6.0
|
349
|
+
-----------
|
350
|
+
|
351
|
+
- Compatible with Sidekiq 3.
|
352
|
+
|
353
|
+
1.5.1
|
354
|
+
-----------
|
355
|
+
|
356
|
+
- Due to a breaking API change in Sidekiq 3.0, this version is limited
|
357
|
+
to Sidekiq 2.x.
|
358
|
+
|
359
|
+
1.5.0
|
360
|
+
-----------
|
361
|
+
|
362
|
+
- Fix issue on Heroku where reliable fetch could orphan jobs [#1573]
|
363
|
+
|
364
|
+
|
365
|
+
1.4.3
|
366
|
+
-----------
|
367
|
+
|
368
|
+
- Reverse sorting of Batches in Web UI [#1098]
|
369
|
+
- Refactoring for Sidekiq 3.0, Pro now requires Sidekiq 2.17.5
|
370
|
+
|
371
|
+
1.4.2
|
372
|
+
-----------
|
373
|
+
|
374
|
+
- Tolerate expired Batches in the web UI.
|
375
|
+
- Fix 100% CPU usage when using weighted queues and reliable fetch.
|
376
|
+
|
377
|
+
1.4.1
|
378
|
+
-----------
|
379
|
+
|
380
|
+
- Add batch progress bar to batch detail page. [#1398]
|
381
|
+
- Fix race condition in initializing Lua scripts
|
382
|
+
|
383
|
+
|
384
|
+
1.4.0
|
385
|
+
-----------
|
386
|
+
|
387
|
+
- Default batch expiration has been extended to 3 days, from 1 day previously.
|
388
|
+
- Batches now sort in the Web UI according to expiry time, not creation time.
|
389
|
+
- Add user-configurable batch expiry. If your batches might take longer
|
390
|
+
than 72 hours to process, you can extend the expiration date.
|
391
|
+
|
392
|
+
```ruby
|
393
|
+
b = Sidekiq::Batch.new
|
394
|
+
b.expires_in 5.days
|
395
|
+
...
|
396
|
+
```
|
397
|
+
|
398
|
+
1.3.2
|
399
|
+
-----------
|
400
|
+
|
401
|
+
- Lazy load Lua scripts so a Redis connection is not required on bootup.
|
402
|
+
|
403
|
+
1.3.1
|
404
|
+
-----------
|
405
|
+
|
406
|
+
- Fix a gemspec packaging issue which broke the Batch UI.
|
407
|
+
|
408
|
+
1.3.0
|
409
|
+
-----------
|
410
|
+
|
411
|
+
Thanks to @jonhyman for his contributions to this Sidekiq Pro release.
|
412
|
+
|
413
|
+
This release includes new functionality based on the SCAN command newly
|
414
|
+
added to Redis 2.8. Pro still works with Redis 2.4 but some
|
415
|
+
functionality will be unavailable.
|
416
|
+
|
417
|
+
- Job Filtering in the Web UI!
|
418
|
+
You can now filter retries and scheduled jobs in the Web UI so you
|
419
|
+
only see the jobs relevant to your needs. Queues cannot be filtered;
|
420
|
+
Redis does not provide the same SCAN operation on the LIST type.
|
421
|
+
**Redis 2.8**
|
422
|
+
![Filtering](https://f.cloud.github.com/assets/2911/1619465/f47529f2-5657-11e3-8cd1-33899eb72aad.png)
|
423
|
+
- SCAN support in the Sidekiq::SortedSet API. Here's an example that
|
424
|
+
finds all jobs which contain the substring "Warehouse::OrderShip"
|
425
|
+
and deletes all matching retries. If the set is large, this API
|
426
|
+
will be **MUCH** faster than standard iteration using each.
|
427
|
+
**Redis 2.8**
|
428
|
+
```ruby
|
429
|
+
Sidekiq::RetrySet.new.scan("Warehouse::OrderShip") do |job|
|
430
|
+
job.delete
|
431
|
+
end
|
432
|
+
```
|
433
|
+
|
434
|
+
- Sidekiq::Batch#jobs now returns the set of JIDs added to the batch.
|
435
|
+
- Sidekiq::Batch#jids returns the complete set of JIDs associated with the batch.
|
436
|
+
- Sidekiq::Batch#remove\_jobs(jid, jid, ...) removes JIDs from the set, allowing early termination of jobs if they become irrelevant according to application logic.
|
437
|
+
- Sidekiq::Batch#include?(jid) allows jobs to check if they are still
|
438
|
+
relevant to a Batch and exit early if not.
|
439
|
+
- Sidekiq::SortedSet#find\_job(jid) now uses server-side Lua if possible **Redis 2.6** [jonhyman]
|
440
|
+
- The statsd integration now sets global job counts:
|
441
|
+
```ruby
|
442
|
+
jobs.count
|
443
|
+
jobs.success
|
444
|
+
jobs.failure
|
445
|
+
```
|
446
|
+
|
447
|
+
- Change shutdown logic to push leftover jobs in the private queue back
|
448
|
+
into the public queue when shutting down with Reliable Fetch. This
|
449
|
+
allows the safe decommission of a Sidekiq Pro process when autoscaling. [jonhyman]
|
450
|
+
- Add support for weighted random fetching with Reliable Fetch [jonhyman]
|
451
|
+
- Pro now requires Sidekiq 2.17.0
|
452
|
+
|
453
|
+
1.2.5
|
454
|
+
-----------
|
455
|
+
|
456
|
+
- Convert Batch UI to use Sidekiq 2.16's support for extension localization.
|
457
|
+
- Update reliable\_push to work with Sidekiq::Client refactoring in 2.16
|
458
|
+
- Pro now requires Sidekiq 2.16.0
|
5
459
|
|
6
460
|
1.2.4
|
7
461
|
-----------
|
@@ -38,7 +492,7 @@ Please see http://sidekiq.org/pro for more details and how to buy.
|
|
38
492
|
- Fix issue with reliable\_push where it didn't return the JID for a pushed
|
39
493
|
job when sending previously cached jobs to Redis.
|
40
494
|
- Add fast Sidekiq::Queue#delete\_job(jid) API which leverages Lua so job lookup is
|
41
|
-
100% server-side. Benchmark vs Sidekiq's Job#delete API
|
495
|
+
100% server-side. Benchmark vs Sidekiq's Job#delete API. **Redis 2.6**
|
42
496
|
|
43
497
|
```
|
44
498
|
Sidekiq Pro API
|
@@ -48,7 +502,7 @@ Sidekiq API
|
|
48
502
|
```
|
49
503
|
|
50
504
|
- Add fast Sidekiq::Queue#delete\_by\_class(klass) API to remove all
|
51
|
-
jobs of a given type. Uses server-side Lua for performance.
|
505
|
+
jobs of a given type. Uses server-side Lua for performance. **Redis 2.6**
|
52
506
|
|
53
507
|
1.1.0
|
54
508
|
-----------
|