sidekiq 3.5.4 → 5.2.7
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 +5 -5
- data/.circleci/config.yml +61 -0
- data/{Contributing.md → .github/contributing.md} +0 -0
- data/.github/issue_template.md +11 -0
- data/.gitignore +3 -0
- data/.travis.yml +5 -10
- data/4.0-Upgrade.md +53 -0
- data/5.0-Upgrade.md +56 -0
- data/COMM-LICENSE +13 -11
- data/Changes.md +376 -1
- data/Ent-Changes.md +201 -2
- data/Gemfile +14 -18
- data/LICENSE +1 -1
- data/Pro-3.0-Upgrade.md +44 -0
- data/Pro-4.0-Upgrade.md +35 -0
- data/Pro-Changes.md +307 -2
- data/README.md +34 -22
- data/Rakefile +3 -3
- data/bin/sidekiq +0 -1
- data/bin/sidekiqctl +13 -86
- data/bin/sidekiqload +23 -27
- data/code_of_conduct.md +50 -0
- data/lib/generators/sidekiq/templates/worker_spec.rb.erb +3 -3
- data/lib/generators/sidekiq/templates/worker_test.rb.erb +6 -6
- data/lib/sidekiq.rb +72 -25
- data/lib/sidekiq/api.rb +206 -73
- data/lib/sidekiq/cli.rb +145 -101
- data/lib/sidekiq/client.rb +42 -36
- data/lib/sidekiq/core_ext.rb +1 -105
- data/lib/sidekiq/ctl.rb +221 -0
- data/lib/sidekiq/delay.rb +42 -0
- data/lib/sidekiq/exception_handler.rb +4 -5
- data/lib/sidekiq/extensions/action_mailer.rb +1 -0
- data/lib/sidekiq/extensions/active_record.rb +1 -0
- data/lib/sidekiq/extensions/class_methods.rb +1 -0
- data/lib/sidekiq/extensions/generic_proxy.rb +8 -1
- data/lib/sidekiq/fetch.rb +36 -111
- data/lib/sidekiq/job_logger.rb +25 -0
- data/lib/sidekiq/job_retry.rb +262 -0
- data/lib/sidekiq/launcher.rb +129 -55
- data/lib/sidekiq/logging.rb +21 -3
- data/lib/sidekiq/manager.rb +83 -182
- data/lib/sidekiq/middleware/chain.rb +1 -0
- data/lib/sidekiq/middleware/i18n.rb +1 -0
- data/lib/sidekiq/middleware/server/active_record.rb +10 -0
- data/lib/sidekiq/paginator.rb +1 -0
- data/lib/sidekiq/processor.rb +221 -103
- data/lib/sidekiq/rails.rb +47 -27
- data/lib/sidekiq/redis_connection.rb +74 -7
- data/lib/sidekiq/scheduled.rb +87 -28
- data/lib/sidekiq/testing.rb +150 -19
- data/lib/sidekiq/testing/inline.rb +1 -0
- data/lib/sidekiq/util.rb +15 -17
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web.rb +120 -184
- data/lib/sidekiq/web/action.rb +89 -0
- data/lib/sidekiq/web/application.rb +353 -0
- data/lib/sidekiq/{web_helpers.rb → web/helpers.rb} +123 -47
- data/lib/sidekiq/web/router.rb +100 -0
- data/lib/sidekiq/worker.rb +135 -18
- data/sidekiq.gemspec +8 -14
- data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
- data/web/assets/javascripts/application.js +24 -20
- data/web/assets/javascripts/dashboard.js +33 -18
- data/web/assets/stylesheets/application-rtl.css +246 -0
- data/web/assets/stylesheets/application.css +401 -7
- data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
- data/web/assets/stylesheets/bootstrap.css +4 -8
- data/web/locales/ar.yml +81 -0
- data/web/locales/cs.yml +11 -1
- data/web/locales/de.yml +1 -1
- data/web/locales/en.yml +4 -0
- data/web/locales/es.yml +4 -3
- data/web/locales/fa.yml +80 -0
- data/web/locales/fr.yml +21 -12
- data/web/locales/he.yml +79 -0
- data/web/locales/ja.yml +24 -13
- data/web/locales/ru.yml +3 -0
- data/web/locales/ur.yml +80 -0
- data/web/views/_footer.erb +7 -9
- data/web/views/_job_info.erb +5 -1
- data/web/views/_nav.erb +5 -19
- data/web/views/_paging.erb +1 -1
- data/web/views/busy.erb +18 -9
- data/web/views/dashboard.erb +5 -5
- data/web/views/dead.erb +1 -1
- data/web/views/layout.erb +13 -5
- data/web/views/morgue.erb +16 -12
- data/web/views/queue.erb +12 -11
- data/web/views/queues.erb +5 -3
- data/web/views/retries.erb +19 -13
- data/web/views/retry.erb +2 -2
- data/web/views/scheduled.erb +4 -4
- data/web/views/scheduled_job_info.erb +1 -1
- metadata +45 -227
- data/lib/sidekiq/actor.rb +0 -39
- data/lib/sidekiq/middleware/server/logging.rb +0 -40
- data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -206
- data/test/config.yml +0 -9
- data/test/env_based_config.yml +0 -11
- data/test/fake_env.rb +0 -0
- data/test/fixtures/en.yml +0 -2
- data/test/helper.rb +0 -49
- data/test/test_api.rb +0 -493
- data/test/test_cli.rb +0 -335
- data/test/test_client.rb +0 -194
- data/test/test_exception_handler.rb +0 -55
- data/test/test_extensions.rb +0 -126
- data/test/test_fetch.rb +0 -104
- data/test/test_logging.rb +0 -34
- data/test/test_manager.rb +0 -168
- data/test/test_middleware.rb +0 -159
- data/test/test_processor.rb +0 -237
- data/test/test_rails.rb +0 -21
- data/test/test_redis_connection.rb +0 -126
- data/test/test_retry.rb +0 -325
- data/test/test_scheduled.rb +0 -114
- data/test/test_scheduling.rb +0 -49
- data/test/test_sidekiq.rb +0 -99
- data/test/test_testing.rb +0 -142
- data/test/test_testing_fake.rb +0 -268
- data/test/test_testing_inline.rb +0 -93
- data/test/test_util.rb +0 -16
- data/test/test_web.rb +0 -608
- data/test/test_web_helpers.rb +0 -53
- 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.cs.js +0 -18
- data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
- 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_js.erb +0 -5
data/Ent-Changes.md
CHANGED
@@ -1,8 +1,207 @@
|
|
1
|
-
Sidekiq Enterprise Changelog
|
2
|
-
|
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)
|
3
4
|
|
4
5
|
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
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
|
+
|
6
205
|
0.7.5
|
7
206
|
----------
|
8
207
|
|
data/Gemfile
CHANGED
@@ -1,27 +1,23 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
gemspec
|
3
2
|
|
4
|
-
|
5
|
-
gem 'simplecov'
|
6
|
-
gem 'minitest'
|
7
|
-
gem 'toxiproxy'
|
3
|
+
gemspec
|
8
4
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
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
|
15
10
|
|
16
|
-
|
17
|
-
gem '
|
11
|
+
group :test do
|
12
|
+
gem 'minitest'
|
13
|
+
gem 'simplecov'
|
18
14
|
end
|
19
15
|
|
20
|
-
|
21
|
-
gem 'pry-byebug'
|
16
|
+
group :development, :test do
|
17
|
+
gem 'pry-byebug', platforms: :mri
|
22
18
|
end
|
23
19
|
|
24
|
-
|
25
|
-
gem '
|
26
|
-
gem '
|
20
|
+
group :load_test do
|
21
|
+
gem 'hiredis'
|
22
|
+
gem 'toxiproxy'
|
27
23
|
end
|
data/LICENSE
CHANGED
@@ -5,5 +5,5 @@ the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
|
|
5
5
|
for license text.
|
6
6
|
|
7
7
|
Sidekiq Pro has a commercial-friendly license allowing private forks
|
8
|
-
and modifications of Sidekiq. Please see
|
8
|
+
and modifications of Sidekiq. Please see https://sidekiq.org/products/pro.html for
|
9
9
|
more detail. You can find the commercial license terms in COMM-LICENSE.
|
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-4.0-Upgrade.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Welcome to Sidekiq Pro 4.0!
|
2
|
+
|
3
|
+
Sidekiq Pro 4.0 is designed to work with Sidekiq 5.0.
|
4
|
+
|
5
|
+
## What's New
|
6
|
+
|
7
|
+
* Batches now "die" if any of their jobs die. You can enumerate the set
|
8
|
+
of dead batches and their associated dead jobs. The success callback
|
9
|
+
for a dead batch will never fire unless these jobs are fixed.
|
10
|
+
```ruby
|
11
|
+
Sidekiq::Batch::DeadSet.new.each do |status|
|
12
|
+
status.dead? # => true
|
13
|
+
status.dead_jobs # => [...]
|
14
|
+
end
|
15
|
+
```
|
16
|
+
This API allows you to enumerate the batches which need help.
|
17
|
+
If you fix the issue and the dead jobs succeed, the batch will succeed.
|
18
|
+
* The older `reliable_fetch` and `timed_fetch` algorithms have been
|
19
|
+
removed. Only super\_fetch is available in 4.0.
|
20
|
+
* The statsd middleware has been tweaked to remove support for legacy,
|
21
|
+
pre-3.6.0 configuration and add relevant tags.
|
22
|
+
* Requires Sidekiq 5.0.5+.
|
23
|
+
|
24
|
+
## Upgrade
|
25
|
+
|
26
|
+
* Upgrade to the latest Sidekiq Pro 3.x.
|
27
|
+
```ruby
|
28
|
+
gem 'sidekiq-pro', '< 4'
|
29
|
+
```
|
30
|
+
* Fix any deprecation warnings you see.
|
31
|
+
* Upgrade to 4.x.
|
32
|
+
```ruby
|
33
|
+
gem 'sidekiq-pro', '< 5'
|
34
|
+
```
|
35
|
+
|
data/Pro-Changes.md
CHANGED
@@ -1,8 +1,313 @@
|
|
1
|
-
Sidekiq Pro Changelog
|
2
|
-
|
1
|
+
# Sidekiq Pro 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)
|
3
4
|
|
4
5
|
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
6
|
|
7
|
+
HEAD
|
8
|
+
---------
|
9
|
+
|
10
|
+
- 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.
|
11
|
+
|
12
|
+
4.0.5
|
13
|
+
---------
|
14
|
+
|
15
|
+
- Increase super\_fetch retriever thread count from 1 to 2 to make it
|
16
|
+
less sensitive to Redis latency.
|
17
|
+
- Better handling of invalid job JSON by reliable scheduler [#4053]
|
18
|
+
- Added ZH, PT, JA and RU translations.
|
19
|
+
|
20
|
+
4.0.4
|
21
|
+
---------
|
22
|
+
|
23
|
+
- Update Sidekiq::Client patches to work with new Module#prepend
|
24
|
+
mechanism in Sidekiq 5.2.0. [#3930]
|
25
|
+
|
26
|
+
4.0.3
|
27
|
+
---------
|
28
|
+
|
29
|
+
- Add at\_exit handler to push any saved jobs in `reliable_push` when exiting. [#3823]
|
30
|
+
- Implement batch death callback. This is fired the first time a job within a batch dies. [#3841]
|
31
|
+
```ruby
|
32
|
+
batch = Sidekiq::Batch.new
|
33
|
+
batch.on(:death, ...)
|
34
|
+
```
|
35
|
+
|
36
|
+
4.0.2
|
37
|
+
---------
|
38
|
+
|
39
|
+
- Remove super\_fetch edge case leading to an unnecessary `sleep(1)`
|
40
|
+
call and resulting latency [#3790]
|
41
|
+
- Fix possible bad statsd metric call on super\_fetch startup
|
42
|
+
- Remove superfluous `freeze` calls on Strings [#3759]
|
43
|
+
|
44
|
+
4.0.1
|
45
|
+
---------
|
46
|
+
|
47
|
+
- Fix incompatibility with the statsd-ruby gem [#3740]
|
48
|
+
- Add tags to Statsd metrics when using Datadog [#3744]
|
49
|
+
|
50
|
+
4.0.0
|
51
|
+
---------
|
52
|
+
|
53
|
+
- See the [Sidekiq Pro 4.0](Pro-4.0-Upgrade.md) release notes.
|
54
|
+
|
55
|
+
|
56
|
+
3.7.1
|
57
|
+
---------
|
58
|
+
|
59
|
+
- Deprecate timed\_fetch. Switch to super\_fetch:
|
60
|
+
```ruby
|
61
|
+
config.super_fetch!
|
62
|
+
```
|
63
|
+
|
64
|
+
|
65
|
+
3.7.0
|
66
|
+
---------
|
67
|
+
|
68
|
+
- Refactor batch job success/failure to gracefully handle several edge
|
69
|
+
cases with regard to Sidekiq::Shutdown. This should greatly reduce
|
70
|
+
the chances of seeing the long-standing "negative pending count" problem. [#3710]
|
71
|
+
|
72
|
+
|
73
|
+
3.6.1
|
74
|
+
---------
|
75
|
+
|
76
|
+
- Add support for Datadog::Statsd, it is the recommended Statsd client. [#3699]
|
77
|
+
```ruby
|
78
|
+
Sidekiq::Pro.dogstatsd = ->{ Datadog::Statsd.new("metrics.example.com", 8125) }
|
79
|
+
```
|
80
|
+
- Size the statsd connection pool based on Sidekiq's concurrency [#3700]
|
81
|
+
|
82
|
+
|
83
|
+
3.6.0
|
84
|
+
---------
|
85
|
+
|
86
|
+
This release overhauls the Statsd metrics support and adds more
|
87
|
+
metrics for tracking Pro feature usage. In your initializer:
|
88
|
+
```ruby
|
89
|
+
Sidekiq::Pro.statsd = ->{ ::Statsd.new("127.0.0.1", 8125) }
|
90
|
+
```
|
91
|
+
Sidekiq Pro will emit more metrics to Statsd:
|
92
|
+
```
|
93
|
+
jobs.expired - when a job is expired
|
94
|
+
jobs.recovered.push - when a job is recovered by reliable_push after network outage
|
95
|
+
jobs.recovered.fetch - when a job is recovered by super_fetch after process crash
|
96
|
+
batch.created - when a batch is created
|
97
|
+
batch.complete - when a batch is completed
|
98
|
+
batch.success - when a batch is successful
|
99
|
+
```
|
100
|
+
Sidekiq Pro's existing Statsd middleware has been rewritten to leverage the new API.
|
101
|
+
Everything should be backwards compatible with one deprecation notice.
|
102
|
+
|
103
|
+
|
104
|
+
3.5.4
|
105
|
+
---------
|
106
|
+
|
107
|
+
- Fix case in SuperFetch where Redis downtime can lead to processor thread death [#3684]
|
108
|
+
- Fix case where TimedFetch might not recover some pending jobs
|
109
|
+
- Fix edge case in Batch::Status#poll leading to premature completion [#3640]
|
110
|
+
- Adjust scan API to check 100 elements at a time, to minimize network round trips
|
111
|
+
when scanning large sets.
|
112
|
+
|
113
|
+
3.5.3
|
114
|
+
---------
|
115
|
+
|
116
|
+
- Restore error check for super\_fetch's job ack [#3601]
|
117
|
+
- Trim error messages saved in Batch's failure hash, preventing huge
|
118
|
+
messages from bloating Redis. [#3570]
|
119
|
+
|
120
|
+
3.5.2
|
121
|
+
---------
|
122
|
+
|
123
|
+
- Fix `Status#completed?` when run against a Batch that had succeeded
|
124
|
+
and was deleted. [#3519]
|
125
|
+
|
126
|
+
3.5.1
|
127
|
+
---------
|
128
|
+
|
129
|
+
- Work with Sidekiq 5.0.2+
|
130
|
+
- Improve performance of super\_fetch with weighted queues [#3489]
|
131
|
+
|
132
|
+
3.5.0
|
133
|
+
---------
|
134
|
+
|
135
|
+
- Add queue pause/unpause endpoints for scripting via curl [#3445]
|
136
|
+
- Change how super\_fetch names private queues to avoid hostname/queue clashes. [#3443]
|
137
|
+
- Re-implement `Sidekiq::Queue#delete_job` to avoid O(n) runtime [#3408]
|
138
|
+
- Batch page displays Pending JIDs if less than 10 [#3130]
|
139
|
+
- Batch page has a Search button to find associated Retries [#3130]
|
140
|
+
- Make Batch UI progress bar more friendly to the colorblind [#3387]
|
141
|
+
|
142
|
+
3.4.5
|
143
|
+
---------
|
144
|
+
|
145
|
+
- Fix potential job loss with reliable scheduler when lots of jobs are scheduled
|
146
|
+
at precisely the same time. Thanks to raivil for his hard work in
|
147
|
+
reproducing the bug. [#3371]
|
148
|
+
|
149
|
+
3.4.4
|
150
|
+
---------
|
151
|
+
|
152
|
+
- Optimize super\_fetch shutdown to restart jobs quicker [#3249]
|
153
|
+
|
154
|
+
3.4.3
|
155
|
+
---------
|
156
|
+
|
157
|
+
- Limit reliable scheduler to enqueue up to 100 jobs per call, minimizing Redis latency [#3332]
|
158
|
+
- Fix bug in super\_fetch logic for queues with `_` in the name [#3339]
|
159
|
+
|
160
|
+
3.4.2
|
161
|
+
---------
|
162
|
+
|
163
|
+
- Add `Batch::Status#invalidated?` API which returns true if any/all
|
164
|
+
JIDs were invalidated within the batch. [#3326]
|
165
|
+
|
166
|
+
3.4.1
|
167
|
+
---------
|
168
|
+
|
169
|
+
- Allow super\_fetch's orphan job check to happen as often as every hour [#3273]
|
170
|
+
- Officially deprecate reliable\_fetch algorithm, I now recommend you use `super_fetch` instead:
|
171
|
+
```ruby
|
172
|
+
Sidekiq.configure_server do |config|
|
173
|
+
config.super_fetch!
|
174
|
+
end
|
175
|
+
```
|
176
|
+
Also note that Sidekiq's `-i/--index` option is no longer used/relevant with super\_fetch.
|
177
|
+
- Don't display "Delete/Retry All" buttons when filtering in Web UI [#3243]
|
178
|
+
- Reimplement Sidekiq::JobSet#find\_job with ZSCAN [#3197]
|
179
|
+
|
180
|
+
3.4.0
|
181
|
+
---------
|
182
|
+
|
183
|
+
- Introducing the newest reliable fetching algorithm: `super_fetch`! This
|
184
|
+
algorithm will replace reliable\_fetch in Pro 4.0. super\_fetch is
|
185
|
+
bullet-proof across all environments, no longer requiring stable
|
186
|
+
hostnames or an index to be set per-process. [#3077]
|
187
|
+
```ruby
|
188
|
+
Sidekiq.configure_server do |config|
|
189
|
+
config.super_fetch!
|
190
|
+
end
|
191
|
+
```
|
192
|
+
Thank you to @jonhyman for code review and the Sidekiq Pro customers that
|
193
|
+
beta tested super\_fetch.
|
194
|
+
|
195
|
+
3.3.3
|
196
|
+
---------
|
197
|
+
|
198
|
+
- Update Web UI extension to work with Sidekiq 4.2.0's new Web UI. [#3075]
|
199
|
+
|
200
|
+
3.3.2
|
201
|
+
---------
|
202
|
+
|
203
|
+
- Minimize batch memory usage after success [#3083]
|
204
|
+
- Extract batch's 24 hr linger expiry to a LINGER constant so it can be tuned. [#3011]
|
205
|
+
|
206
|
+
3.3.1
|
207
|
+
---------
|
208
|
+
|
209
|
+
- If environment is unset, treat it as development so reliable\_fetch works as before 3.2.2.
|
210
|
+
|
211
|
+
3.3.0
|
212
|
+
---------
|
213
|
+
|
214
|
+
- Don't delete batches immediately upon success but set a 24 hr expiry, this allows
|
215
|
+
Sidekiq::Batch::Status#poll to work, even after batch success. [#3011]
|
216
|
+
- New `Sidekiq::PendingSet#destroy(jid)` API to remove poison pill jobs [#3015]
|
217
|
+
|
218
|
+
3.2.2
|
219
|
+
---------
|
220
|
+
|
221
|
+
- A default value for -i is only set in development now, staging or
|
222
|
+
other environments must set an index if you wish to use reliable\_fetch. [#2971]
|
223
|
+
- Fix nil dereference when checking for jobs over timeout in timed\_fetch
|
224
|
+
|
225
|
+
|
226
|
+
3.2.1
|
227
|
+
---------
|
228
|
+
|
229
|
+
- timed\_fetch now works with namespaces. [ryansch]
|
230
|
+
|
231
|
+
|
232
|
+
3.2.0
|
233
|
+
---------
|
234
|
+
|
235
|
+
- Fixed detection of missing batches, `NoSuchBatch` should be raised
|
236
|
+
properly now if `Sidekiq::Batch.new(bid)` is called on a batch no
|
237
|
+
longer in Redis.
|
238
|
+
- Remove support for Pro 1.x format batches. This version will no
|
239
|
+
longer seamlessly process batches created with Sidekiq Pro 1.x.
|
240
|
+
As always, upgrade one major version at a time to ensure a smooth
|
241
|
+
transition.
|
242
|
+
- Fix edge case where a parent batch could expire before a child batch
|
243
|
+
was finished processing, leading to missing batches [#2889]
|
244
|
+
|
245
|
+
2.1.5
|
246
|
+
---------
|
247
|
+
|
248
|
+
- Fix edge case where a parent batch could expire before a child batch
|
249
|
+
was finished processing, leading to missing batches [#2889]
|
250
|
+
|
251
|
+
3.1.0
|
252
|
+
---------
|
253
|
+
|
254
|
+
- New container-friendly fetch algorithm: `timed_fetch`. See the
|
255
|
+
[wiki documentation](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server)
|
256
|
+
for trade offs between the two reliability options. You should
|
257
|
+
use this if you are on Heroku, Docker, Amazon ECS or EBS or
|
258
|
+
another container-based system.
|
259
|
+
|
260
|
+
|
261
|
+
3.0.6
|
262
|
+
---------
|
263
|
+
|
264
|
+
- Fix race condition on reliable fetch shutdown
|
265
|
+
|
266
|
+
3.0.5
|
267
|
+
---------
|
268
|
+
|
269
|
+
- Statsd metrics now account for ActiveJob class names
|
270
|
+
- Allow reliable fetch internals to be overridden [jonhyman]
|
271
|
+
|
272
|
+
3.0.4
|
273
|
+
---------
|
274
|
+
|
275
|
+
- Queue pausing no longer requires reliable fetch. [#2786]
|
276
|
+
|
277
|
+
3.0.3, 2.1.4
|
278
|
+
------------
|
279
|
+
|
280
|
+
- Convert Lua-based `Sidekiq::Queue#delete_by_class` to Ruby-based, to
|
281
|
+
avoid O(N^2) performance and possible Redis failure. [#2806]
|
282
|
+
|
283
|
+
3.0.2
|
284
|
+
-----------
|
285
|
+
|
286
|
+
- Make job registration with batch part of the atomic push so batch
|
287
|
+
metadata can't get out of sync with the job data. [#2714]
|
288
|
+
|
289
|
+
3.0.1
|
290
|
+
-----------
|
291
|
+
|
292
|
+
- Remove a number of Redis version checks since we can assume 2.8+ now.
|
293
|
+
- Fix expiring jobs client middleware not loaded on server
|
294
|
+
|
295
|
+
3.0.0
|
296
|
+
-----------
|
297
|
+
|
298
|
+
- See the [Pro 3.0 release notes](Pro-3.0-Upgrade.md).
|
299
|
+
|
300
|
+
2.1.3
|
301
|
+
-----------
|
302
|
+
|
303
|
+
- Don't enable strict priority if using weighted queueing like `-q a,1 -q b,1`
|
304
|
+
- Safer JSON mangling in Lua [#2639]
|
305
|
+
|
306
|
+
2.1.2
|
307
|
+
-----------
|
308
|
+
|
309
|
+
- Lock Sidekiq Pro 2.x to Sidekiq 3.x.
|
310
|
+
|
6
311
|
2.1.1
|
7
312
|
-----------
|
8
313
|
|