sidekiq 6.0.7 → 6.2.0

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.

Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +70 -1
  3. data/README.md +2 -6
  4. data/bin/sidekiq +7 -2
  5. data/lib/sidekiq.rb +5 -3
  6. data/lib/sidekiq/api.rb +28 -10
  7. data/lib/sidekiq/cli.rb +23 -7
  8. data/lib/sidekiq/client.rb +16 -11
  9. data/lib/sidekiq/extensions/action_mailer.rb +3 -2
  10. data/lib/sidekiq/extensions/active_record.rb +4 -3
  11. data/lib/sidekiq/extensions/class_methods.rb +5 -4
  12. data/lib/sidekiq/fetch.rb +29 -21
  13. data/lib/sidekiq/job_retry.rb +1 -0
  14. data/lib/sidekiq/launcher.rb +55 -3
  15. data/lib/sidekiq/logger.rb +3 -2
  16. data/lib/sidekiq/manager.rb +4 -4
  17. data/lib/sidekiq/middleware/chain.rb +1 -1
  18. data/lib/sidekiq/processor.rb +4 -4
  19. data/lib/sidekiq/rails.rb +16 -18
  20. data/lib/sidekiq/redis_connection.rb +15 -12
  21. data/lib/sidekiq/sd_notify.rb +1 -1
  22. data/lib/sidekiq/testing.rb +1 -1
  23. data/lib/sidekiq/version.rb +1 -1
  24. data/lib/sidekiq/web.rb +35 -72
  25. data/lib/sidekiq/web/application.rb +9 -5
  26. data/lib/sidekiq/web/csrf_protection.rb +177 -0
  27. data/lib/sidekiq/web/helpers.rb +26 -8
  28. data/lib/sidekiq/web/router.rb +5 -2
  29. data/lib/sidekiq/worker.rb +2 -5
  30. data/sidekiq.gemspec +11 -4
  31. data/web/assets/images/apple-touch-icon.png +0 -0
  32. data/web/assets/javascripts/application.js +3 -8
  33. data/web/assets/stylesheets/application-dark.css +71 -33
  34. data/web/assets/stylesheets/application.css +24 -8
  35. data/web/locales/fr.yml +1 -1
  36. data/web/locales/pl.yml +4 -4
  37. data/web/locales/ru.yml +4 -0
  38. data/web/views/busy.erb +44 -14
  39. data/web/views/layout.erb +1 -0
  40. data/web/views/morgue.erb +1 -1
  41. data/web/views/queues.erb +1 -1
  42. data/web/views/retries.erb +1 -1
  43. data/web/views/scheduled.erb +1 -1
  44. metadata +17 -45
  45. data/.circleci/config.yml +0 -60
  46. data/.github/contributing.md +0 -32
  47. data/.github/issue_template.md +0 -11
  48. data/.gitignore +0 -13
  49. data/.standard.yml +0 -20
  50. data/3.0-Upgrade.md +0 -70
  51. data/4.0-Upgrade.md +0 -53
  52. data/5.0-Upgrade.md +0 -56
  53. data/6.0-Upgrade.md +0 -72
  54. data/COMM-LICENSE +0 -97
  55. data/Ent-2.0-Upgrade.md +0 -37
  56. data/Ent-Changes.md +0 -256
  57. data/Gemfile +0 -24
  58. data/Gemfile.lock +0 -208
  59. data/Pro-2.0-Upgrade.md +0 -138
  60. data/Pro-3.0-Upgrade.md +0 -44
  61. data/Pro-4.0-Upgrade.md +0 -35
  62. data/Pro-5.0-Upgrade.md +0 -25
  63. data/Pro-Changes.md +0 -782
  64. data/Rakefile +0 -10
  65. data/code_of_conduct.md +0 -50
data/Ent-Changes.md DELETED
@@ -1,256 +0,0 @@
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
- 2.0.1
8
- -------------
9
-
10
- - Periodic job registration API adjusted to avoid loading classes in initializer [#4271]
11
- - Remove support for deprecated ENV variables (COUNT, MAXMEM\_MB, INDEX) in swarm code
12
-
13
- 2.0.0
14
- -------------
15
-
16
- - Except for the [newly required credentials](https://github.com/mperham/sidekiq/issues/4232), Sidekiq Enterprise 2.0 does
17
- not have any significant migration steps.
18
- - Sidekiq Enterprise must now be started with valid license credentials. [#4232]
19
- - Call `GC.compact` if possible in sidekiqswarm before forking [#4181]
20
- - Changes for forward-compatibility with Sidekiq 6.0.
21
- - Add death handler to remove any lingering unique locks [#4162]
22
- - Backoff can now be customized per rate limiter [#4219]
23
- - Code formatting changes for StandardRB
24
-
25
- 1.8.1
26
- -------------
27
-
28
- - Fix excessive lock reclaims with concurrent limiter [#4105]
29
- - 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.
30
-
31
- 1.8.0
32
- -------------
33
-
34
- - Require Sidekiq Pro 4.0 and Sidekiq 5.2.
35
- - Refactor historical metrics API to use revamped Statsd support in Sidekiq Pro
36
- - Add a gauge to historical metrics for `default` queue latency [#4079]
37
-
38
- 1.7.2
39
- -------------
40
-
41
- - Add PT and JA translations
42
- - Fix elapsed time calculations to use monotonic clock [#4000, sj26]
43
- - Fix edge case where flapping leadership would cause old periodic
44
- jobs to be fired once [#3974]
45
- - Add support for sidekiqswarm memory monitoring on FreeBSD [#3884]
46
-
47
- 1.7.1
48
- -------------
49
-
50
- - Fix Lua error in concurrent rate limiter under heavy contention
51
- - Remove superfluous `freeze` calls on Strings [#3759]
52
-
53
- 1.7.0
54
- -------------
55
-
56
- - **NEW FEATURE** [Rolling restarts](https://github.com/mperham/sidekiq/wiki/Ent-Rolling-Restarts) - great for long running jobs!
57
- - Adjust middleware so unique jobs that don't push aren't registered in a Batch [#3662]
58
- - Add new unlimited rate limiter, useful for testing [#3743]
59
- ```ruby
60
- limiter = Sidekiq::Limiter.unlimited(...any args...)
61
- ```
62
-
63
- 1.6.1
64
- -------------
65
-
66
- - Fix crash in rate limiter middleware when used with custom exceptions [#3604]
67
-
68
- 1.6.0
69
- -------------
70
-
71
- - Show process "leader" tag on Busy page, requires Sidekiq 5.0.2 [#2867]
72
- - Capture custom metrics with the `save_history` API. [#2815]
73
- - Implement new `unique_until: 'start'` policy option. [#3471]
74
-
75
- 1.5.4
76
- -------------
77
-
78
- - Fix broken Cron page in Web UI [#3458]
79
-
80
- 1.5.3
81
- -------------
82
-
83
- - Remove dependency on the algorithms gem [#3446]
84
- - Allow user to specify max memory in megabytes with SIDEKIQ\_MAXMEM\_MB [#3451]
85
- - Implement logic to detect app startup failure, sidekiqswarm will exit
86
- rather than try to restart the app forever [#3450]
87
- - Another fix for doubly-encrypted arguments [#3368]
88
-
89
- 1.5.2
90
- -------------
91
-
92
- - Fix encrypted arguments double-encrypted by retry or rate limiting [#3368]
93
- - Fix leak in concurrent rate limiter, run this in Rails console to clean up existing data [#3323]
94
- ```ruby
95
- expiry = 1.month.to_i; Sidekiq::Limiter.redis { |c| c.scan_each(match: "lmtr-cfree-*") { |key| c.expire(key, expiry) } }
96
- ```
97
-
98
- 1.5.1
99
- -------------
100
-
101
- - Fix issue with census startup when not using Bundler configuration for
102
- source credentials.
103
-
104
- 1.5.0
105
- -------------
106
-
107
- - Add new web authorization API [#3251]
108
- - Update all sidekiqswarm env vars to use SIDEKIQ\_ prefix [#3218]
109
- - Add census reporting, the leader will ping contribsys nightly with aggregate usage metrics
110
-
111
- 1.4.0
112
- -------------
113
-
114
- - No functional changes, require latest Sidekiq and Sidekiq Pro versions
115
-
116
- 1.3.2
117
- -------------
118
-
119
- - Upgrade encryption to use OpenSSL's more secure GCM mode. [#3060]
120
-
121
- 1.3.1
122
- -------------
123
-
124
- - Fix multi-process memory monitoring on CentOS 6.x [#3063]
125
- - Polish the new encryption feature a bit.
126
-
127
- 1.3.0
128
- -------------
129
-
130
- - **BETA** [New encryption feature](https://github.com/mperham/sidekiq/wiki/Ent-Encryption)
131
- which automatically encrypts the last argument of a Worker, aka the secret bag.
132
-
133
- 1.2.4
134
- -------------
135
-
136
- - Fix issue causing some minutely jobs to execute every other minute.
137
- - Log a warning if slow periodic processing causes us to miss a clock tick.
138
-
139
- 1.2.3
140
- -------------
141
-
142
- - Periodic jobs could stop executing until process restart if Redis goes down [#3047]
143
-
144
- 1.2.2
145
- -------------
146
-
147
- - Add API to check if a unique lock is present. See [#2932] for details.
148
- - Tune concurrent limiters to minimize thread thrashing under heavy contention. [#2944]
149
- - Add option for tuning which Bundler groups get preloaded with `sidekiqswarm` [#3025]
150
- ```
151
- SIDEKIQ_PRELOAD=default,production bin/sidekiqswarm ...
152
- # Use an empty value for maximum application compatibility
153
- SIDEKIQ_PRELOAD= bin/sidekiqswarm ...
154
- ```
155
-
156
- 1.2.1
157
- -------------
158
-
159
- - Multi-Process mode can now monitor the RSS memory of children and
160
- restart any that grow too large. To limit children to 1GB each:
161
- ```
162
- MAXMEM_KB=1048576 COUNT=2 bundle exec sidekiqswarm ...
163
- ```
164
-
165
- 1.2.0
166
- -------------
167
-
168
- - **NEW FEATURE** Multi-process mode! Sidekiq Enterprise can now fork multiple worker
169
- processes, enabling significant memory savings. See the [wiki
170
- documentation](https://github.com/mperham/sidekiq/wiki/Ent-Multi-Process) for details.
171
-
172
-
173
- 0.7.10
174
- -------------
175
-
176
- - More precise gemspec dependency versioning
177
-
178
- 1.1.0
179
- -------------
180
-
181
- - **NEW FEATURE** Historical queue metrics, [documented in the wiki](https://github.com/mperham/sidekiq/wiki/Ent-Historical-Metrics) [#2719]
182
-
183
- 0.7.9, 1.0.2
184
- -------------
185
-
186
- - Window limiters can now accept arbitrary window sizes [#2686]
187
- - Fix race condition in window limiters leading to non-stop OverLimit [#2704]
188
- - Fix invalid overage counts when nesting concurrent limiters
189
-
190
- 1.0.1
191
- ----------
192
-
193
- - Fix crash in periodic subsystem when a follower shuts down, thanks
194
- to @justinko for reporting.
195
-
196
- 1.0.0
197
- ----------
198
-
199
- - Enterprise 1.x targets Sidekiq 4.x.
200
- - Rewrite several features to remove Celluloid dependency. No
201
- functional changes.
202
-
203
- 0.7.8
204
- ----------
205
-
206
- - Fix `unique_for: false` [#2658]
207
-
208
-
209
- 0.7.7
210
- ----------
211
-
212
- - Enterprise 0.x targets Sidekiq 3.x.
213
- - Fix racy shutdown event which could lead to disappearing periodic
214
- jobs, requires Sidekiq >= 3.5.3.
215
- - Add new :leader event which is fired when a process gains leadership.
216
-
217
- 0.7.6
218
- ----------
219
-
220
- - Redesign how overrated jobs are rescheduled to avoid creating new
221
- jobs. [#2619]
222
-
223
- 0.7.5
224
- ----------
225
-
226
- - Fix dynamic creation of concurrent limiters [#2617]
227
-
228
- 0.7.4
229
- ----------
230
- - Add additional check to prevent duplicate periodic job creation
231
- - Allow user-specified TTLs for rate limiters [#2607]
232
- - Paginate rate limiter index page [#2606]
233
-
234
- 0.7.3
235
- ----------
236
-
237
- - Rework `Sidekiq::Limiter` redis handling to match global redis handling.
238
- - Allow user to customize rate limit backoff logic and handle custom
239
- rate limit errors.
240
- - Fix scalability issue with Limiter index page.
241
-
242
- 0.7.2
243
- ----------
244
-
245
- - Fix typo which prevented limiters with '0' in their names.
246
-
247
- 0.7.1
248
- ----------
249
-
250
- - Fix issue where unique scheduled jobs can't be enqueued upon schedule
251
- due to the existing unique lock. [#2499]
252
-
253
- 0.7.0
254
- ----------
255
-
256
- Initial release.
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "rake"
6
- gem "redis-namespace"
7
- gem "rails", ">= 6.0.2"
8
- gem "sqlite3", 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
- gem "standard"
19
- end
20
-
21
- group :load_test do
22
- gem "hiredis"
23
- gem "toxiproxy"
24
- end
data/Gemfile.lock DELETED
@@ -1,208 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sidekiq (6.0.7)
5
- connection_pool (>= 2.2.2)
6
- rack (~> 2.0)
7
- rack-protection (>= 2.0.0)
8
- redis (>= 4.1.0)
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- actioncable (6.0.2.1)
14
- actionpack (= 6.0.2.1)
15
- nio4r (~> 2.0)
16
- websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.2.1)
18
- actionpack (= 6.0.2.1)
19
- activejob (= 6.0.2.1)
20
- activerecord (= 6.0.2.1)
21
- activestorage (= 6.0.2.1)
22
- activesupport (= 6.0.2.1)
23
- mail (>= 2.7.1)
24
- actionmailer (6.0.2.1)
25
- actionpack (= 6.0.2.1)
26
- actionview (= 6.0.2.1)
27
- activejob (= 6.0.2.1)
28
- mail (~> 2.5, >= 2.5.4)
29
- rails-dom-testing (~> 2.0)
30
- actionpack (6.0.2.1)
31
- actionview (= 6.0.2.1)
32
- activesupport (= 6.0.2.1)
33
- rack (~> 2.0, >= 2.0.8)
34
- rack-test (>= 0.6.3)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.2.1)
38
- actionpack (= 6.0.2.1)
39
- activerecord (= 6.0.2.1)
40
- activestorage (= 6.0.2.1)
41
- activesupport (= 6.0.2.1)
42
- nokogiri (>= 1.8.5)
43
- actionview (6.0.2.1)
44
- activesupport (= 6.0.2.1)
45
- builder (~> 3.1)
46
- erubi (~> 1.4)
47
- rails-dom-testing (~> 2.0)
48
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.2.1)
50
- activesupport (= 6.0.2.1)
51
- globalid (>= 0.3.6)
52
- activemodel (6.0.2.1)
53
- activesupport (= 6.0.2.1)
54
- activerecord (6.0.2.1)
55
- activemodel (= 6.0.2.1)
56
- activesupport (= 6.0.2.1)
57
- activerecord-jdbc-adapter (60.1-java)
58
- activerecord (~> 6.0.0)
59
- activerecord-jdbcsqlite3-adapter (60.1-java)
60
- activerecord-jdbc-adapter (= 60.1)
61
- jdbc-sqlite3 (~> 3.8, < 3.30)
62
- activestorage (6.0.2.1)
63
- actionpack (= 6.0.2.1)
64
- activejob (= 6.0.2.1)
65
- activerecord (= 6.0.2.1)
66
- marcel (~> 0.3.1)
67
- activesupport (6.0.2.1)
68
- concurrent-ruby (~> 1.0, >= 1.0.2)
69
- i18n (>= 0.7, < 2)
70
- minitest (~> 5.1)
71
- tzinfo (~> 1.1)
72
- zeitwerk (~> 2.2)
73
- ast (2.4.0)
74
- builder (3.2.4)
75
- byebug (11.1.1)
76
- coderay (1.1.2)
77
- concurrent-ruby (1.1.6)
78
- connection_pool (2.2.2)
79
- crass (1.0.6)
80
- docile (1.3.2)
81
- erubi (1.9.0)
82
- globalid (0.4.2)
83
- activesupport (>= 4.2.0)
84
- hiredis (0.6.3)
85
- hiredis (0.6.3-java)
86
- i18n (1.8.2)
87
- concurrent-ruby (~> 1.0)
88
- jaro_winkler (1.5.4)
89
- jaro_winkler (1.5.4-java)
90
- jdbc-sqlite3 (3.28.0)
91
- loofah (2.4.0)
92
- crass (~> 1.0.2)
93
- nokogiri (>= 1.5.9)
94
- mail (2.7.1)
95
- mini_mime (>= 0.1.1)
96
- marcel (0.3.3)
97
- mimemagic (~> 0.3.2)
98
- method_source (0.9.2)
99
- mimemagic (0.3.4)
100
- mini_mime (1.0.2)
101
- mini_portile2 (2.4.0)
102
- minitest (5.14.0)
103
- nio4r (2.5.2)
104
- nio4r (2.5.2-java)
105
- nokogiri (1.10.8)
106
- mini_portile2 (~> 2.4.0)
107
- nokogiri (1.10.8-java)
108
- parallel (1.19.1)
109
- parser (2.7.0.4)
110
- ast (~> 2.4.0)
111
- pry (0.12.2)
112
- coderay (~> 1.1.0)
113
- method_source (~> 0.9.0)
114
- pry-byebug (3.8.0)
115
- byebug (~> 11.0)
116
- pry (~> 0.10)
117
- rack (2.2.2)
118
- rack-protection (2.0.8.1)
119
- rack
120
- rack-test (1.1.0)
121
- rack (>= 1.0, < 3)
122
- rails (6.0.2.1)
123
- actioncable (= 6.0.2.1)
124
- actionmailbox (= 6.0.2.1)
125
- actionmailer (= 6.0.2.1)
126
- actionpack (= 6.0.2.1)
127
- actiontext (= 6.0.2.1)
128
- actionview (= 6.0.2.1)
129
- activejob (= 6.0.2.1)
130
- activemodel (= 6.0.2.1)
131
- activerecord (= 6.0.2.1)
132
- activestorage (= 6.0.2.1)
133
- activesupport (= 6.0.2.1)
134
- bundler (>= 1.3.0)
135
- railties (= 6.0.2.1)
136
- sprockets-rails (>= 2.0.0)
137
- rails-dom-testing (2.0.3)
138
- activesupport (>= 4.2.0)
139
- nokogiri (>= 1.6)
140
- rails-html-sanitizer (1.3.0)
141
- loofah (~> 2.3)
142
- railties (6.0.2.1)
143
- actionpack (= 6.0.2.1)
144
- activesupport (= 6.0.2.1)
145
- method_source
146
- rake (>= 0.8.7)
147
- thor (>= 0.20.3, < 2.0)
148
- rainbow (3.0.0)
149
- rake (13.0.1)
150
- redis (4.1.3)
151
- redis-namespace (1.7.0)
152
- redis (>= 3.0.4)
153
- rubocop (0.79.0)
154
- jaro_winkler (~> 1.5.1)
155
- parallel (~> 1.10)
156
- parser (>= 2.7.0.1)
157
- rainbow (>= 2.2.2, < 4.0)
158
- ruby-progressbar (~> 1.7)
159
- unicode-display_width (>= 1.4.0, < 1.7)
160
- rubocop-performance (1.5.2)
161
- rubocop (>= 0.71.0)
162
- ruby-progressbar (1.10.1)
163
- simplecov (0.18.2)
164
- docile (~> 1.1)
165
- simplecov-html (~> 0.11)
166
- simplecov-html (0.12.0)
167
- sprockets (4.0.0)
168
- concurrent-ruby (~> 1.0)
169
- rack (> 1, < 3)
170
- sprockets-rails (3.2.1)
171
- actionpack (>= 4.0)
172
- activesupport (>= 4.0)
173
- sprockets (>= 3.0.0)
174
- sqlite3 (1.4.2)
175
- standard (0.2.1)
176
- rubocop (~> 0.79.0)
177
- rubocop-performance (~> 1.5.1)
178
- thor (1.0.1)
179
- thread_safe (0.3.6)
180
- thread_safe (0.3.6-java)
181
- toxiproxy (1.0.3)
182
- tzinfo (1.2.6)
183
- thread_safe (~> 0.1)
184
- unicode-display_width (1.6.1)
185
- websocket-driver (0.7.1)
186
- websocket-extensions (>= 0.1.0)
187
- websocket-driver (0.7.1-java)
188
- websocket-extensions (>= 0.1.0)
189
- websocket-extensions (0.1.4)
190
- zeitwerk (2.2.2)
191
-
192
- PLATFORMS
193
- java
194
- ruby
195
-
196
- DEPENDENCIES
197
- activerecord-jdbcsqlite3-adapter
198
- hiredis
199
- minitest
200
- pry-byebug
201
- rails (>= 6.0.2)
202
- rake
203
- redis-namespace
204
- sidekiq!
205
- simplecov
206
- sqlite3
207
- standard
208
- toxiproxy