sidekiq 5.2.8
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/.circleci/config.yml +61 -0
- data/.github/contributing.md +32 -0
- data/.github/issue_template.md +11 -0
- data/.gitignore +15 -0
- data/.travis.yml +11 -0
- data/3.0-Upgrade.md +70 -0
- data/4.0-Upgrade.md +53 -0
- data/5.0-Upgrade.md +56 -0
- data/COMM-LICENSE +97 -0
- data/Changes.md +1542 -0
- data/Ent-Changes.md +238 -0
- data/Gemfile +23 -0
- data/LICENSE +9 -0
- data/Pro-2.0-Upgrade.md +138 -0
- data/Pro-3.0-Upgrade.md +44 -0
- data/Pro-4.0-Upgrade.md +35 -0
- data/Pro-Changes.md +759 -0
- data/README.md +109 -0
- data/Rakefile +9 -0
- data/bin/sidekiq +18 -0
- data/bin/sidekiqctl +20 -0
- data/bin/sidekiqload +149 -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 +237 -0
- data/lib/sidekiq/api.rb +940 -0
- data/lib/sidekiq/cli.rb +445 -0
- data/lib/sidekiq/client.rb +243 -0
- data/lib/sidekiq/core_ext.rb +1 -0
- data/lib/sidekiq/ctl.rb +221 -0
- data/lib/sidekiq/delay.rb +42 -0
- data/lib/sidekiq/exception_handler.rb +29 -0
- data/lib/sidekiq/extensions/action_mailer.rb +57 -0
- data/lib/sidekiq/extensions/active_record.rb +40 -0
- data/lib/sidekiq/extensions/class_methods.rb +40 -0
- data/lib/sidekiq/extensions/generic_proxy.rb +31 -0
- data/lib/sidekiq/fetch.rb +81 -0
- data/lib/sidekiq/job_logger.rb +25 -0
- data/lib/sidekiq/job_retry.rb +262 -0
- data/lib/sidekiq/launcher.rb +173 -0
- data/lib/sidekiq/logging.rb +122 -0
- data/lib/sidekiq/manager.rb +137 -0
- data/lib/sidekiq/middleware/chain.rb +150 -0
- data/lib/sidekiq/middleware/i18n.rb +42 -0
- data/lib/sidekiq/middleware/server/active_record.rb +23 -0
- data/lib/sidekiq/paginator.rb +43 -0
- data/lib/sidekiq/processor.rb +279 -0
- data/lib/sidekiq/rails.rb +58 -0
- data/lib/sidekiq/redis_connection.rb +144 -0
- data/lib/sidekiq/scheduled.rb +174 -0
- data/lib/sidekiq/testing.rb +333 -0
- data/lib/sidekiq/testing/inline.rb +29 -0
- data/lib/sidekiq/util.rb +66 -0
- data/lib/sidekiq/version.rb +4 -0
- data/lib/sidekiq/web.rb +213 -0
- data/lib/sidekiq/web/action.rb +89 -0
- data/lib/sidekiq/web/application.rb +353 -0
- data/lib/sidekiq/web/helpers.rb +325 -0
- data/lib/sidekiq/web/router.rb +100 -0
- data/lib/sidekiq/worker.rb +220 -0
- data/sidekiq.gemspec +21 -0
- data/web/assets/images/favicon.ico +0 -0
- data/web/assets/images/logo.png +0 -0
- data/web/assets/images/status.png +0 -0
- data/web/assets/javascripts/application.js +92 -0
- data/web/assets/javascripts/dashboard.js +315 -0
- data/web/assets/stylesheets/application-rtl.css +246 -0
- data/web/assets/stylesheets/application.css +1144 -0
- data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
- data/web/assets/stylesheets/bootstrap.css +5 -0
- data/web/locales/ar.yml +81 -0
- data/web/locales/cs.yml +78 -0
- data/web/locales/da.yml +68 -0
- data/web/locales/de.yml +69 -0
- data/web/locales/el.yml +68 -0
- data/web/locales/en.yml +81 -0
- data/web/locales/es.yml +70 -0
- data/web/locales/fa.yml +80 -0
- data/web/locales/fr.yml +78 -0
- data/web/locales/he.yml +79 -0
- data/web/locales/hi.yml +75 -0
- data/web/locales/it.yml +69 -0
- data/web/locales/ja.yml +80 -0
- data/web/locales/ko.yml +68 -0
- data/web/locales/nb.yml +77 -0
- data/web/locales/nl.yml +68 -0
- data/web/locales/pl.yml +59 -0
- data/web/locales/pt-br.yml +68 -0
- data/web/locales/pt.yml +67 -0
- data/web/locales/ru.yml +78 -0
- data/web/locales/sv.yml +68 -0
- data/web/locales/ta.yml +75 -0
- data/web/locales/uk.yml +76 -0
- data/web/locales/ur.yml +80 -0
- data/web/locales/zh-cn.yml +68 -0
- data/web/locales/zh-tw.yml +68 -0
- data/web/views/_footer.erb +20 -0
- data/web/views/_job_info.erb +88 -0
- data/web/views/_nav.erb +52 -0
- data/web/views/_paging.erb +23 -0
- data/web/views/_poll_link.erb +7 -0
- data/web/views/_status.erb +4 -0
- data/web/views/_summary.erb +40 -0
- data/web/views/busy.erb +98 -0
- data/web/views/dashboard.erb +75 -0
- data/web/views/dead.erb +34 -0
- data/web/views/layout.erb +40 -0
- data/web/views/morgue.erb +75 -0
- data/web/views/queue.erb +46 -0
- data/web/views/queues.erb +30 -0
- data/web/views/retries.erb +80 -0
- data/web/views/retry.erb +34 -0
- data/web/views/scheduled.erb +54 -0
- data/web/views/scheduled_job_info.erb +8 -0
- metadata +230 -0
data/Ent-Changes.md
ADDED
@@ -0,0 +1,238 @@
|
|
1
|
+
# Sidekiq Enterprise Changelog
|
2
|
+
|
3
|
+
[Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
|
4
|
+
|
5
|
+
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
6
|
+
|
7
|
+
1.8.1
|
8
|
+
-------------
|
9
|
+
|
10
|
+
- Fix excessive lock reclaims with concurrent limiter [#4105]
|
11
|
+
- Add ES translations, see issues [#3949](https://github.com/mperham/sidekiq/issues/3949) and [#3951](https://github.com/mperham/sidekiq/issues/3951) to add your own language.
|
12
|
+
|
13
|
+
1.8.0
|
14
|
+
-------------
|
15
|
+
|
16
|
+
- Require Sidekiq Pro 4.0 and Sidekiq 5.2.
|
17
|
+
- Refactor historical metrics API to use revamped Statsd support in Sidekiq Pro
|
18
|
+
- Add a gauge to historical metrics for `default` queue latency [#4079]
|
19
|
+
|
20
|
+
1.7.2
|
21
|
+
-------------
|
22
|
+
|
23
|
+
- Add PT and JA translations
|
24
|
+
- Fix elapsed time calculations to use monotonic clock [#4000, sj26]
|
25
|
+
- Fix edge case where flapping leadership would cause old periodic
|
26
|
+
jobs to be fired once [#3974]
|
27
|
+
- Add support for sidekiqswarm memory monitoring on FreeBSD [#3884]
|
28
|
+
|
29
|
+
1.7.1
|
30
|
+
-------------
|
31
|
+
|
32
|
+
- Fix Lua error in concurrent rate limiter under heavy contention
|
33
|
+
- Remove superfluous `freeze` calls on Strings [#3759]
|
34
|
+
|
35
|
+
1.7.0
|
36
|
+
-------------
|
37
|
+
|
38
|
+
- **NEW FEATURE** [Rolling restarts](https://github.com/mperham/sidekiq/wiki/Ent-Rolling-Restarts) - great for long running jobs!
|
39
|
+
- Adjust middleware so unique jobs that don't push aren't registered in a Batch [#3662]
|
40
|
+
- Add new unlimited rate limiter, useful for testing [#3743]
|
41
|
+
```ruby
|
42
|
+
limiter = Sidekiq::Limiter.unlimited(...any args...)
|
43
|
+
```
|
44
|
+
|
45
|
+
1.6.1
|
46
|
+
-------------
|
47
|
+
|
48
|
+
- Fix crash in rate limiter middleware when used with custom exceptions [#3604]
|
49
|
+
|
50
|
+
1.6.0
|
51
|
+
-------------
|
52
|
+
|
53
|
+
- Show process "leader" tag on Busy page, requires Sidekiq 5.0.2 [#2867]
|
54
|
+
- Capture custom metrics with the `save_history` API. [#2815]
|
55
|
+
- Implement new `unique_until: 'start'` policy option. [#3471]
|
56
|
+
|
57
|
+
1.5.4
|
58
|
+
-------------
|
59
|
+
|
60
|
+
- Fix broken Cron page in Web UI [#3458]
|
61
|
+
|
62
|
+
1.5.3
|
63
|
+
-------------
|
64
|
+
|
65
|
+
- Remove dependency on the algorithms gem [#3446]
|
66
|
+
- Allow user to specify max memory in megabytes with SIDEKIQ\_MAXMEM\_MB [#3451]
|
67
|
+
- Implement logic to detect app startup failure, sidekiqswarm will exit
|
68
|
+
rather than try to restart the app forever [#3450]
|
69
|
+
- Another fix for doubly-encrypted arguments [#3368]
|
70
|
+
|
71
|
+
1.5.2
|
72
|
+
-------------
|
73
|
+
|
74
|
+
- Fix encrypted arguments double-encrypted by retry or rate limiting [#3368]
|
75
|
+
- Fix leak in concurrent rate limiter, run this in Rails console to clean up existing data [#3323]
|
76
|
+
```ruby
|
77
|
+
expiry = 1.month.to_i; Sidekiq::Limiter.redis { |c| c.scan_each(match: "lmtr-cfree-*") { |key| c.expire(key, expiry) } }
|
78
|
+
```
|
79
|
+
|
80
|
+
1.5.1
|
81
|
+
-------------
|
82
|
+
|
83
|
+
- Fix issue with census startup when not using Bundler configuration for
|
84
|
+
source credentials.
|
85
|
+
|
86
|
+
1.5.0
|
87
|
+
-------------
|
88
|
+
|
89
|
+
- Add new web authorization API [#3251]
|
90
|
+
- Update all sidekiqswarm env vars to use SIDEKIQ\_ prefix [#3218]
|
91
|
+
- Add census reporting, the leader will ping contribsys nightly with aggregate usage metrics
|
92
|
+
|
93
|
+
1.4.0
|
94
|
+
-------------
|
95
|
+
|
96
|
+
- No functional changes, require latest Sidekiq and Sidekiq Pro versions
|
97
|
+
|
98
|
+
1.3.2
|
99
|
+
-------------
|
100
|
+
|
101
|
+
- Upgrade encryption to use OpenSSL's more secure GCM mode. [#3060]
|
102
|
+
|
103
|
+
1.3.1
|
104
|
+
-------------
|
105
|
+
|
106
|
+
- Fix multi-process memory monitoring on CentOS 6.x [#3063]
|
107
|
+
- Polish the new encryption feature a bit.
|
108
|
+
|
109
|
+
1.3.0
|
110
|
+
-------------
|
111
|
+
|
112
|
+
- **BETA** [New encryption feature](https://github.com/mperham/sidekiq/wiki/Ent-Encryption)
|
113
|
+
which automatically encrypts the last argument of a Worker, aka the secret bag.
|
114
|
+
|
115
|
+
1.2.4
|
116
|
+
-------------
|
117
|
+
|
118
|
+
- Fix issue causing some minutely jobs to execute every other minute.
|
119
|
+
- Log a warning if slow periodic processing causes us to miss a clock tick.
|
120
|
+
|
121
|
+
1.2.3
|
122
|
+
-------------
|
123
|
+
|
124
|
+
- Periodic jobs could stop executing until process restart if Redis goes down [#3047]
|
125
|
+
|
126
|
+
1.2.2
|
127
|
+
-------------
|
128
|
+
|
129
|
+
- Add API to check if a unique lock is present. See [#2932] for details.
|
130
|
+
- Tune concurrent limiters to minimize thread thrashing under heavy contention. [#2944]
|
131
|
+
- Add option for tuning which Bundler groups get preloaded with `sidekiqswarm` [#3025]
|
132
|
+
```
|
133
|
+
SIDEKIQ_PRELOAD=default,production bin/sidekiqswarm ...
|
134
|
+
# Use an empty value for maximum application compatibility
|
135
|
+
SIDEKIQ_PRELOAD= bin/sidekiqswarm ...
|
136
|
+
```
|
137
|
+
|
138
|
+
1.2.1
|
139
|
+
-------------
|
140
|
+
|
141
|
+
- Multi-Process mode can now monitor the RSS memory of children and
|
142
|
+
restart any that grow too large. To limit children to 1GB each:
|
143
|
+
```
|
144
|
+
MAXMEM_KB=1048576 COUNT=2 bundle exec sidekiqswarm ...
|
145
|
+
```
|
146
|
+
|
147
|
+
1.2.0
|
148
|
+
-------------
|
149
|
+
|
150
|
+
- **NEW FEATURE** Multi-process mode! Sidekiq Enterprise can now fork multiple worker
|
151
|
+
processes, enabling significant memory savings. See the [wiki
|
152
|
+
documentation](https://github.com/mperham/sidekiq/wiki/Ent-Multi-Process) for details.
|
153
|
+
|
154
|
+
|
155
|
+
0.7.10
|
156
|
+
-------------
|
157
|
+
|
158
|
+
- More precise gemspec dependency versioning
|
159
|
+
|
160
|
+
1.1.0
|
161
|
+
-------------
|
162
|
+
|
163
|
+
- **NEW FEATURE** Historical queue metrics, [documented in the wiki](https://github.com/mperham/sidekiq/wiki/Ent-Historical-Metrics) [#2719]
|
164
|
+
|
165
|
+
0.7.9, 1.0.2
|
166
|
+
-------------
|
167
|
+
|
168
|
+
- Window limiters can now accept arbitrary window sizes [#2686]
|
169
|
+
- Fix race condition in window limiters leading to non-stop OverLimit [#2704]
|
170
|
+
- Fix invalid overage counts when nesting concurrent limiters
|
171
|
+
|
172
|
+
1.0.1
|
173
|
+
----------
|
174
|
+
|
175
|
+
- Fix crash in periodic subsystem when a follower shuts down, thanks
|
176
|
+
to @justinko for reporting.
|
177
|
+
|
178
|
+
1.0.0
|
179
|
+
----------
|
180
|
+
|
181
|
+
- Enterprise 1.x targets Sidekiq 4.x.
|
182
|
+
- Rewrite several features to remove Celluloid dependency. No
|
183
|
+
functional changes.
|
184
|
+
|
185
|
+
0.7.8
|
186
|
+
----------
|
187
|
+
|
188
|
+
- Fix `unique_for: false` [#2658]
|
189
|
+
|
190
|
+
|
191
|
+
0.7.7
|
192
|
+
----------
|
193
|
+
|
194
|
+
- Enterprise 0.x targets Sidekiq 3.x.
|
195
|
+
- Fix racy shutdown event which could lead to disappearing periodic
|
196
|
+
jobs, requires Sidekiq >= 3.5.3.
|
197
|
+
- Add new :leader event which is fired when a process gains leadership.
|
198
|
+
|
199
|
+
0.7.6
|
200
|
+
----------
|
201
|
+
|
202
|
+
- Redesign how overrated jobs are rescheduled to avoid creating new
|
203
|
+
jobs. [#2619]
|
204
|
+
|
205
|
+
0.7.5
|
206
|
+
----------
|
207
|
+
|
208
|
+
- Fix dynamic creation of concurrent limiters [#2617]
|
209
|
+
|
210
|
+
0.7.4
|
211
|
+
----------
|
212
|
+
- Add additional check to prevent duplicate periodic job creation
|
213
|
+
- Allow user-specified TTLs for rate limiters [#2607]
|
214
|
+
- Paginate rate limiter index page [#2606]
|
215
|
+
|
216
|
+
0.7.3
|
217
|
+
----------
|
218
|
+
|
219
|
+
- Rework `Sidekiq::Limiter` redis handling to match global redis handling.
|
220
|
+
- Allow user to customize rate limit backoff logic and handle custom
|
221
|
+
rate limit errors.
|
222
|
+
- Fix scalability issue with Limiter index page.
|
223
|
+
|
224
|
+
0.7.2
|
225
|
+
----------
|
226
|
+
|
227
|
+
- Fix typo which prevented limiters with '0' in their names.
|
228
|
+
|
229
|
+
0.7.1
|
230
|
+
----------
|
231
|
+
|
232
|
+
- Fix issue where unique scheduled jobs can't be enqueued upon schedule
|
233
|
+
due to the existing unique lock. [#2499]
|
234
|
+
|
235
|
+
0.7.0
|
236
|
+
----------
|
237
|
+
|
238
|
+
Initial release.
|
data/Gemfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'rake'
|
6
|
+
gem 'redis-namespace'
|
7
|
+
gem 'rails', '~> 5.2'
|
8
|
+
gem 'sqlite3', '~> 1.3.6', platforms: :ruby
|
9
|
+
gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
|
10
|
+
|
11
|
+
group :test do
|
12
|
+
gem 'minitest'
|
13
|
+
gem 'simplecov'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :development, :test do
|
17
|
+
gem 'pry-byebug', platforms: :mri
|
18
|
+
end
|
19
|
+
|
20
|
+
group :load_test do
|
21
|
+
gem 'hiredis'
|
22
|
+
gem 'toxiproxy'
|
23
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Copyright (c) Contributed Systems LLC
|
2
|
+
|
3
|
+
Sidekiq is an Open Source project licensed under the terms of
|
4
|
+
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
|
5
|
+
for license text.
|
6
|
+
|
7
|
+
Sidekiq Pro has a commercial-friendly license allowing private forks
|
8
|
+
and modifications of Sidekiq. Please see https://sidekiq.org/products/pro.html for
|
9
|
+
more detail. You can find the commercial license terms in COMM-LICENSE.
|
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
|
+
```
|