sidekiq 6.0.7 → 6.5.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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +209 -2
  3. data/LICENSE +3 -3
  4. data/README.md +11 -10
  5. data/bin/sidekiq +8 -3
  6. data/bin/sidekiqload +70 -66
  7. data/bin/sidekiqmon +1 -1
  8. data/lib/generators/sidekiq/job_generator.rb +57 -0
  9. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  10. data/lib/generators/sidekiq/templates/{worker_spec.rb.erb → job_spec.rb.erb} +1 -1
  11. data/lib/generators/sidekiq/templates/{worker_test.rb.erb → job_test.rb.erb} +1 -1
  12. data/lib/sidekiq/api.rb +180 -123
  13. data/lib/sidekiq/cli.rb +80 -45
  14. data/lib/sidekiq/client.rb +52 -71
  15. data/lib/sidekiq/{util.rb → component.rb} +11 -14
  16. data/lib/sidekiq/delay.rb +2 -0
  17. data/lib/sidekiq/extensions/action_mailer.rb +3 -2
  18. data/lib/sidekiq/extensions/active_record.rb +4 -3
  19. data/lib/sidekiq/extensions/class_methods.rb +5 -4
  20. data/lib/sidekiq/extensions/generic_proxy.rb +4 -2
  21. data/lib/sidekiq/fetch.rb +41 -30
  22. data/lib/sidekiq/job.rb +13 -0
  23. data/lib/sidekiq/job_logger.rb +16 -28
  24. data/lib/sidekiq/job_retry.rb +36 -36
  25. data/lib/sidekiq/job_util.rb +71 -0
  26. data/lib/sidekiq/launcher.rb +123 -63
  27. data/lib/sidekiq/logger.rb +11 -20
  28. data/lib/sidekiq/manager.rb +35 -34
  29. data/lib/sidekiq/middleware/chain.rb +28 -17
  30. data/lib/sidekiq/middleware/current_attributes.rb +61 -0
  31. data/lib/sidekiq/middleware/i18n.rb +6 -4
  32. data/lib/sidekiq/middleware/modules.rb +19 -0
  33. data/lib/sidekiq/monitor.rb +1 -1
  34. data/lib/sidekiq/paginator.rb +8 -8
  35. data/lib/sidekiq/processor.rb +41 -41
  36. data/lib/sidekiq/rails.rb +38 -22
  37. data/lib/sidekiq/redis_client_adapter.rb +154 -0
  38. data/lib/sidekiq/redis_connection.rb +87 -53
  39. data/lib/sidekiq/ring_buffer.rb +29 -0
  40. data/lib/sidekiq/scheduled.rb +60 -24
  41. data/lib/sidekiq/sd_notify.rb +1 -1
  42. data/lib/sidekiq/testing/inline.rb +4 -4
  43. data/lib/sidekiq/testing.rb +39 -40
  44. data/lib/sidekiq/transaction_aware_client.rb +45 -0
  45. data/lib/sidekiq/version.rb +1 -1
  46. data/lib/sidekiq/web/action.rb +2 -2
  47. data/lib/sidekiq/web/application.rb +21 -12
  48. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  49. data/lib/sidekiq/web/helpers.rb +40 -34
  50. data/lib/sidekiq/web/router.rb +5 -2
  51. data/lib/sidekiq/web.rb +36 -72
  52. data/lib/sidekiq/worker.rb +136 -16
  53. data/lib/sidekiq.rb +107 -30
  54. data/sidekiq.gemspec +11 -4
  55. data/web/assets/images/apple-touch-icon.png +0 -0
  56. data/web/assets/javascripts/application.js +113 -65
  57. data/web/assets/javascripts/dashboard.js +51 -51
  58. data/web/assets/stylesheets/application-dark.css +64 -43
  59. data/web/assets/stylesheets/application-rtl.css +0 -4
  60. data/web/assets/stylesheets/application.css +42 -239
  61. data/web/locales/ar.yml +8 -2
  62. data/web/locales/en.yml +4 -1
  63. data/web/locales/es.yml +18 -2
  64. data/web/locales/fr.yml +8 -1
  65. data/web/locales/ja.yml +3 -0
  66. data/web/locales/lt.yml +1 -1
  67. data/web/locales/pl.yml +4 -4
  68. data/web/locales/pt-br.yml +27 -9
  69. data/web/locales/ru.yml +4 -0
  70. data/web/views/_footer.erb +1 -1
  71. data/web/views/_job_info.erb +1 -1
  72. data/web/views/_poll_link.erb +2 -5
  73. data/web/views/_summary.erb +7 -7
  74. data/web/views/busy.erb +51 -20
  75. data/web/views/dashboard.erb +22 -14
  76. data/web/views/dead.erb +1 -1
  77. data/web/views/layout.erb +2 -1
  78. data/web/views/morgue.erb +6 -6
  79. data/web/views/queue.erb +11 -11
  80. data/web/views/queues.erb +4 -4
  81. data/web/views/retries.erb +7 -7
  82. data/web/views/retry.erb +1 -1
  83. data/web/views/scheduled.erb +1 -1
  84. metadata +29 -51
  85. data/.circleci/config.yml +0 -60
  86. data/.github/contributing.md +0 -32
  87. data/.github/issue_template.md +0 -11
  88. data/.gitignore +0 -13
  89. data/.standard.yml +0 -20
  90. data/3.0-Upgrade.md +0 -70
  91. data/4.0-Upgrade.md +0 -53
  92. data/5.0-Upgrade.md +0 -56
  93. data/6.0-Upgrade.md +0 -72
  94. data/COMM-LICENSE +0 -97
  95. data/Ent-2.0-Upgrade.md +0 -37
  96. data/Ent-Changes.md +0 -256
  97. data/Gemfile +0 -24
  98. data/Gemfile.lock +0 -208
  99. data/Pro-2.0-Upgrade.md +0 -138
  100. data/Pro-3.0-Upgrade.md +0 -44
  101. data/Pro-4.0-Upgrade.md +0 -35
  102. data/Pro-5.0-Upgrade.md +0 -25
  103. data/Pro-Changes.md +0 -782
  104. data/Rakefile +0 -10
  105. data/code_of_conduct.md +0 -50
  106. data/lib/generators/sidekiq/worker_generator.rb +0 -57
  107. data/lib/sidekiq/exception_handler.rb +0 -27
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.7
4
+ version: 6.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0
19
+ version: 4.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.0
26
+ version: 4.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rack-protection
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: 2.0.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 2.0.0
69
55
  description: Simple, efficient background processing for Ruby.
70
56
  email:
71
57
  - mperham@gmail.com
@@ -75,74 +61,61 @@ executables:
75
61
  extensions: []
76
62
  extra_rdoc_files: []
77
63
  files:
78
- - ".circleci/config.yml"
79
- - ".github/contributing.md"
80
- - ".github/issue_template.md"
81
- - ".gitignore"
82
- - ".standard.yml"
83
- - 3.0-Upgrade.md
84
- - 4.0-Upgrade.md
85
- - 5.0-Upgrade.md
86
- - 6.0-Upgrade.md
87
- - COMM-LICENSE
88
64
  - Changes.md
89
- - Ent-2.0-Upgrade.md
90
- - Ent-Changes.md
91
- - Gemfile
92
- - Gemfile.lock
93
65
  - LICENSE
94
- - Pro-2.0-Upgrade.md
95
- - Pro-3.0-Upgrade.md
96
- - Pro-4.0-Upgrade.md
97
- - Pro-5.0-Upgrade.md
98
- - Pro-Changes.md
99
66
  - README.md
100
- - Rakefile
101
67
  - bin/sidekiq
102
68
  - bin/sidekiqload
103
69
  - bin/sidekiqmon
104
- - code_of_conduct.md
105
- - lib/generators/sidekiq/templates/worker.rb.erb
106
- - lib/generators/sidekiq/templates/worker_spec.rb.erb
107
- - lib/generators/sidekiq/templates/worker_test.rb.erb
108
- - lib/generators/sidekiq/worker_generator.rb
70
+ - lib/generators/sidekiq/job_generator.rb
71
+ - lib/generators/sidekiq/templates/job.rb.erb
72
+ - lib/generators/sidekiq/templates/job_spec.rb.erb
73
+ - lib/generators/sidekiq/templates/job_test.rb.erb
109
74
  - lib/sidekiq.rb
110
75
  - lib/sidekiq/api.rb
111
76
  - lib/sidekiq/cli.rb
112
77
  - lib/sidekiq/client.rb
78
+ - lib/sidekiq/component.rb
113
79
  - lib/sidekiq/delay.rb
114
- - lib/sidekiq/exception_handler.rb
115
80
  - lib/sidekiq/extensions/action_mailer.rb
116
81
  - lib/sidekiq/extensions/active_record.rb
117
82
  - lib/sidekiq/extensions/class_methods.rb
118
83
  - lib/sidekiq/extensions/generic_proxy.rb
119
84
  - lib/sidekiq/fetch.rb
85
+ - lib/sidekiq/job.rb
120
86
  - lib/sidekiq/job_logger.rb
121
87
  - lib/sidekiq/job_retry.rb
88
+ - lib/sidekiq/job_util.rb
122
89
  - lib/sidekiq/launcher.rb
123
90
  - lib/sidekiq/logger.rb
124
91
  - lib/sidekiq/manager.rb
125
92
  - lib/sidekiq/middleware/chain.rb
93
+ - lib/sidekiq/middleware/current_attributes.rb
126
94
  - lib/sidekiq/middleware/i18n.rb
95
+ - lib/sidekiq/middleware/modules.rb
127
96
  - lib/sidekiq/monitor.rb
128
97
  - lib/sidekiq/paginator.rb
129
98
  - lib/sidekiq/processor.rb
130
99
  - lib/sidekiq/rails.rb
100
+ - lib/sidekiq/redis_client_adapter.rb
131
101
  - lib/sidekiq/redis_connection.rb
102
+ - lib/sidekiq/ring_buffer.rb
132
103
  - lib/sidekiq/scheduled.rb
133
104
  - lib/sidekiq/sd_notify.rb
134
105
  - lib/sidekiq/systemd.rb
135
106
  - lib/sidekiq/testing.rb
136
107
  - lib/sidekiq/testing/inline.rb
137
- - lib/sidekiq/util.rb
108
+ - lib/sidekiq/transaction_aware_client.rb
138
109
  - lib/sidekiq/version.rb
139
110
  - lib/sidekiq/web.rb
140
111
  - lib/sidekiq/web/action.rb
141
112
  - lib/sidekiq/web/application.rb
113
+ - lib/sidekiq/web/csrf_protection.rb
142
114
  - lib/sidekiq/web/helpers.rb
143
115
  - lib/sidekiq/web/router.rb
144
116
  - lib/sidekiq/worker.rb
145
117
  - sidekiq.gemspec
118
+ - web/assets/images/apple-touch-icon.png
146
119
  - web/assets/images/favicon.ico
147
120
  - web/assets/images/logo.png
148
121
  - web/assets/images/status.png
@@ -199,11 +172,16 @@ files:
199
172
  - web/views/retry.erb
200
173
  - web/views/scheduled.erb
201
174
  - web/views/scheduled_job_info.erb
202
- homepage: http://sidekiq.org
175
+ homepage: https://sidekiq.org
203
176
  licenses:
204
177
  - LGPL-3.0
205
- metadata: {}
206
- post_install_message:
178
+ metadata:
179
+ homepage_uri: https://sidekiq.org
180
+ bug_tracker_uri: https://github.com/mperham/sidekiq/issues
181
+ documentation_uri: https://github.com/mperham/sidekiq/wiki
182
+ changelog_uri: https://github.com/mperham/sidekiq/blob/main/Changes.md
183
+ source_code_uri: https://github.com/mperham/sidekiq
184
+ post_install_message:
207
185
  rdoc_options: []
208
186
  require_paths:
209
187
  - lib
@@ -218,8 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
196
  - !ruby/object:Gem::Version
219
197
  version: '0'
220
198
  requirements: []
221
- rubygems_version: 3.0.3
222
- signing_key:
199
+ rubygems_version: 3.2.32
200
+ signing_key:
223
201
  specification_version: 4
224
202
  summary: Simple, efficient background processing for Ruby
225
203
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,60 +0,0 @@
1
- version: 2
2
- references:
3
- unit: &unit
4
- run:
5
- name: Run test suite
6
- command: bundle exec rake
7
- restore: &restore
8
- restore_cache:
9
- keys:
10
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
- # fallback to using the latest cache if no exact match is found
12
- - v1-dependencies-
13
- bundle: &bundle
14
- run:
15
- name: install dependencies
16
- command: |
17
- bundle install --jobs=4 --retry=3 --path vendor/bundle
18
- save: &save
19
- save_cache:
20
- paths:
21
- - ./vendor/bundle
22
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
23
- jobs:
24
- "ruby-2.5":
25
- docker:
26
- - image: circleci/ruby:2.5
27
- - image: circleci/redis:4.0
28
- steps:
29
- - checkout
30
- - <<: *restore
31
- - <<: *bundle
32
- - <<: *save
33
- - <<: *unit
34
- "ruby-2.6":
35
- docker:
36
- - image: circleci/ruby:2.6
37
- - image: circleci/redis:4.0
38
- steps:
39
- - checkout
40
- - <<: *restore
41
- - <<: *bundle
42
- - <<: *save
43
- - <<: *unit
44
- "jruby":
45
- docker:
46
- - image: circleci/jruby:latest
47
- - image: circleci/redis:4.0
48
- steps:
49
- - checkout
50
- - <<: *restore
51
- - <<: *bundle
52
- - <<: *save
53
- - <<: *unit
54
-
55
- workflows:
56
- version: 2
57
- build:
58
- jobs:
59
- - "ruby-2.5"
60
- - "ruby-2.6"
@@ -1,32 +0,0 @@
1
- # Contributing
2
-
3
- ## Issues
4
-
5
- When opening an issue:
6
-
7
- * include the full **backtrace** with your error
8
- * include your Sidekiq initializer
9
- * list versions you are using: Ruby, Rails, Sidekiq, OS, etc.
10
-
11
- It's always better to include more info rather than less.
12
-
13
- ## Code
14
-
15
- It's always best to open an issue before investing a lot of time into a
16
- fix or new functionality. Functionality must meet my design goals and
17
- vision for the project to be accepted; I would be happy to discuss how
18
- your idea can best fit into Sidekiq.
19
-
20
- ## Legal
21
-
22
- By submitting a Pull Request, you disavow any rights or claims to any changes
23
- submitted to the Sidekiq project and assign the copyright of
24
- those changes to Contributed Systems LLC.
25
-
26
- If you cannot or do not want to reassign those rights (your employment
27
- contract for your employer may not allow this), you should not submit a PR.
28
- Open an issue and someone else can do the work.
29
-
30
- This is a legal way of saying "If you submit a PR to us, that code becomes ours".
31
- 99.9% of the time that's what you intend anyways; we hope it doesn't scare you
32
- away from contributing.
@@ -1,11 +0,0 @@
1
- Ruby version:
2
- Sidekiq / Pro / Enterprise version(s):
3
-
4
- Please include your initializer and any error message with the full backtrace.
5
-
6
- Are you using an old version?
7
- Have you checked the changelogs to see if your issue has been fixed in a later version?
8
-
9
- https://github.com/mperham/sidekiq/blob/master/Changes.md
10
- https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
11
- https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- .rvmrc
2
- .ruby-version
3
- tags
4
- *.swp
5
- dump.rdb
6
- .rbx
7
- coverage/
8
- vendor/
9
- .bundle/
10
- .sass-cache/
11
- tmp/
12
- pkg/*.gem
13
- .byebug_history
data/.standard.yml DELETED
@@ -1,20 +0,0 @@
1
- ruby_version: 2.5.0
2
- fix: false
3
- parallel: true
4
- ignore:
5
- - test/**/*
6
- - examples/**/*
7
- - myapp/**/*
8
- - 'lib/sidekiq.rb':
9
- - Lint/InheritException
10
- - 'lib/sidekiq/extensions/**/*':
11
- - Style/MethodMissingSuper
12
- - Style/MissingRespondToMissing
13
- - 'lib/**/*':
14
- - Naming/AsciiIdentifiers
15
- - Lint/RescueException
16
- - Security/YAMLLoad
17
- - Naming/AccessorMethodName
18
- - Naming/MethodName
19
- - Style/GlobalVars
20
- - Style/Alias
data/3.0-Upgrade.md DELETED
@@ -1,70 +0,0 @@
1
- # Upgrading to Sidekiq 3.0
2
-
3
- Sidekiq 3.0 brings several new features but also removes old APIs and
4
- changes a few data elements in Redis. To upgrade cleanly:
5
-
6
- * Upgrade to the latest Sidekiq 2.x and run it for a few weeks.
7
- `gem 'sidekiq', '< 3'`
8
- This is only needed if you have retries pending.
9
- * 3rd party gems which use **client-side middleware** will need to update
10
- due to an API change. The Redis connection for a particular job is
11
- passed thru the middleware to handle sharding where jobs can
12
- be pushed to different redis server instances.
13
-
14
- `def call(worker_class, msg, queue, redis_pool)`
15
-
16
- Client-side middleware should use `redis_pool.with { |conn| ... }` to
17
- perform Redis operations and **not** `Sidekiq.redis`.
18
- * If you used the capistrano integration, you'll need to pull in the
19
- new [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq)
20
- gem and use it in your deploy.rb.
21
- * API changes:
22
- - `Sidekiq::Client.registered_workers` replaced by `Sidekiq::Workers.new`
23
- - `Sidekiq::Client.registered_queues` replaced by `Sidekiq::Queue.all`
24
- - `Sidekiq::Worker#retries_exhausted` replaced by `Sidekiq::Worker.sidekiq_retries_exhausted`
25
- - `Sidekiq::Workers#each` has changed significantly with a reworking
26
- of Sidekiq's internal process/thread data model.
27
- * `sidekiq/api` is no longer automatically required. If your code uses
28
- the API, you will need to require it.
29
- * Redis-to-Go is no longer transparently activated on Heroku so as to not play
30
- favorites with any particular Redis service. You need to set a config option
31
- for your app:
32
- `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`. You may also use
33
- the generic `REDIS_URL`. See
34
- [Advanced Options: Setting the Location of your Redis server][1]
35
- for details.
36
- * Anyone using Airbrake, Honeybadger, Exceptional or ExceptionNotifier
37
- will need to update their error gem version to the latest to pull in
38
- Sidekiq support. Sidekiq will not provide explicit support for these
39
- services so as to not play favorites with any particular error service.
40
- * MRI 1.9 is no longer officially supported. Sidekiq's official
41
- support policy is to support the current and previous major releases
42
- of MRI and Rails. As of February 2014, that's MRI 2.1, MRI 2.0, JRuby 1.7, Rails 4.0
43
- and Rails 3.2. I will consider PRs to fix issues found by users for
44
- other platforms/versions.
45
-
46
- ## Error Service Providers
47
-
48
- If you previously provided a middleware to capture job errors, you
49
- should instead provide a global error handler with Sidekiq 3.0. This
50
- ensures **any** error within Sidekiq will be logged appropriately, not
51
- just during job execution.
52
-
53
- ```ruby
54
- if Sidekiq::VERSION < '3'
55
- # old behavior
56
- Sidekiq.configure_server do |config|
57
- config.server_middleware do |chain|
58
- chain.add MyErrorService::Middleware
59
- end
60
- end
61
- else
62
- Sidekiq.configure_server do |config|
63
- config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
64
- end
65
- end
66
- ```
67
-
68
- Your error handler must respond to `call(exception, context_hash)`.
69
-
70
- [1]: https://github.com/mperham/sidekiq/wiki/Advanced-Options#via-env-variable
data/4.0-Upgrade.md DELETED
@@ -1,53 +0,0 @@
1
- # Welcome to Sidekiq 4.0!
2
-
3
- Sidekiq 4.0 contains a redesigned, more efficient core with less overhead per job.
4
- See my blog for [an overview of Sidekiq 4's higher performance](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
5
-
6
- ## What's New
7
-
8
- * Sidekiq no longer uses Celluloid. If your application code uses Celluloid,
9
- you will need to pull it in yourself.
10
-
11
- * `redis-namespace` has been removed from Sidekiq's gem dependencies. If
12
- you want to use namespacing ([and I strongly urge you not to](http://www.mikeperham.com/2015/09/24/storing-data-with-redis/)), you'll need to add the gem to your Gemfile:
13
- ```ruby
14
- gem 'redis-namespace'
15
- ```
16
-
17
- * **Redis 2.8.0 or greater is required.** Redis 2.8 was released two years
18
- ago and contains **many** useful features which Sidekiq couldn't
19
- leverage until now. **Redis 3.0.3 or greater is recommended** for large
20
- scale use [#2431](https://github.com/mperham/sidekiq/issues/2431).
21
-
22
- * Jobs are now fetched from Redis in parallel, making Sidekiq more
23
- resilient to high network latency. This means that Sidekiq requires
24
- more Redis connections per process. You must have a minimum of
25
- `concurrency + 2` connections in your pool or Sidekiq will exit.
26
- When in doubt, let Sidekiq size the connection pool for you.
27
-
28
- * Worker data is no longer updated in real-time but rather upon every
29
- heartbeat. Don't expect the `Sidekiq::Workers` API to be millisecond-precise.
30
-
31
- * There's a new testing API based off the `Sidekiq::Queues` namespace. All
32
- assertions made against the Worker class still work as expected.
33
- ```ruby
34
- assert_equal 0, Sidekiq::Queues["default"].size
35
- HardWorker.perform_async("log")
36
- assert_equal 1, Sidekiq::Queues["default"].size
37
- assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
38
- Sidekiq::Queues.clear_all
39
- ```
40
-
41
- ## Upgrade
42
-
43
- First, make sure you are using Redis 2.8 or greater. Next:
44
-
45
- * Upgrade to the latest Sidekiq 3.x.
46
- ```ruby
47
- gem 'sidekiq', '< 4'
48
- ```
49
- * Fix any deprecation warnings you see.
50
- * Upgrade to 4.x.
51
- ```ruby
52
- gem 'sidekiq', '< 5'
53
- ```
data/5.0-Upgrade.md DELETED
@@ -1,56 +0,0 @@
1
- # Welcome to Sidekiq 5.0!
2
-
3
- Sidekiq 5.0 contains a reworked job dispatch and execution core to integrate
4
- better with the new Rails 5.0 Executor. It also drops support for older
5
- versions of Ruby and Rails and adds support for RTL languages in the Web UI.
6
-
7
- ## What's New
8
-
9
- * Integrate job logging and retry logic directly in with the job
10
- execution logic in Sidekiq::Processor. Previously this logic was
11
- defined as middleware. In Rails 5.0, ActiveSupport::Executor handles ActiveRecord
12
- connection management, job callbacks, development mode class loading,
13
- etc. Because of its extensive responsibilities, the Executor can't be
14
- integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
15
- too. Sidekiq 4.2 had a hack to make it work but this redesign provides
16
- a cleaner integration. [#3235]
17
- * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
18
- no longer available by default. The extensions allow you to marshal
19
- job arguments as YAML, leading to cases where job payloads could be many
20
- 100s of KB or larger if not careful, leading to Redis networking
21
- timeouts or other problems. As noted in the Best Practices wiki page,
22
- Sidekiq is designed for jobs with small, simple arguments.
23
-
24
- Add this line to your initializer to re-enable them and get the old behavior:
25
- ```ruby
26
- Sidekiq::Extensions.enable_delay!
27
- ```
28
- The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299]
29
- * Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread
30
- **ST**o**P**) instead of USR1 as USR1 is not available on JRuby.
31
- USR1 will continue to be supported in Sidekiq 5.x for backwards
32
- compatibility and will be removed in Sidekiq 6.x. [#3302]
33
- * The Web UI is now bi-directional - it can render either LTR
34
- (left-to-right) or RTL languages. With this change, **Farsi, Arabic,
35
- Hebrew and Urdu** are officially supported. [#3381]
36
- * Jobs which can't be parsed due to invalid JSON are now pushed
37
- immediately to the Dead set since they require manual intervention and
38
- will never execute successfully as is. The Web UI has been updated to
39
- more gracefully display these jobs. [#3296]
40
- * **Rails 3.2** is no longer supported.
41
- * **Ruby 2.0 and Ruby 2.1** are no longer supported. Ruby 2.2.2+ is required.
42
-
43
- ## Upgrade
44
-
45
- As always, please upgrade Sidekiq **one major version at a time**.
46
- If you are already running Sidekiq 4.x, then:
47
-
48
- * Upgrade to the latest Sidekiq 4.x.
49
- ```ruby
50
- gem 'sidekiq', '< 5'
51
- ```
52
- * Fix any deprecation warnings you see.
53
- * Upgrade to 5.x.
54
- ```ruby
55
- gem 'sidekiq', '< 6'
56
- ```
data/6.0-Upgrade.md DELETED
@@ -1,72 +0,0 @@
1
- # Welcome to Sidekiq 6.0!
2
-
3
- Sidekiq 6.0 contains some breaking changes which streamline proper operation
4
- of Sidekiq. It also drops support for EOL versions of Ruby and Rails.
5
-
6
- ## What's New
7
-
8
- This release has major breaking changes. Read and test carefully in production.
9
-
10
- - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
- features/internals like the retry subsystem. Prefer the native
12
- Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
13
- (requires Rails 6.0.2)
14
- ```ruby
15
- class MyJob < ActiveJob::Base
16
- queue_as :myqueue
17
- sidekiq_options retry: 10, backtrace: 20
18
- def perform(...)
19
- end
20
- end
21
- ```
22
- - Logging has been redesigned to allow pluggable formatters and several
23
- formats ship with Sidekiq:
24
- * default - your typical output on macOS
25
- * heroku - enabled specifically when running in Heroku
26
- * json - a JSON format for search indexing, one hash per line
27
-
28
- Sidekiq will enable the best formatter for the detected environment but
29
- you can override it by configuring the log formatter explicitly. See
30
- 'sidekiq/logger' for implementation details.
31
-
32
- ```ruby
33
- Sidekiq.configure_server do |config|
34
- config.log_formatter = AcmeCorp::PlainLogFormatter.new
35
- # config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
36
- end
37
- ```
38
- Please see the [Logging](https://github.com/mperham/sidekiq/wiki/Logging) wiki page for the latest documentation and notes.
39
- - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
40
- I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
41
- how modern services should be managed with a proper init system.
42
- Managing services manually is more error-prone, let your operating system do it for you.
43
- systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.
44
- - **Validate proper usage of the `REDIS_PROVIDER` variable.**
45
- This variable is meant to hold the name of the environment
46
- variable which contains your Redis URL, so that you can switch Redis
47
- providers quickly and easily with a single variable change. It is not
48
- meant to hold the actual Redis URL itself. If you want to manually set
49
- the Redis URL then you may set `REDIS_URL` directly. [#3969]
50
- - **Increase default shutdown timeout from 8 seconds to 25 seconds.**
51
- Both Heroku and ECS now use 30 second shutdown timeout
52
- by default and we want Sidekiq to take advantage of this time. If you
53
- have deployment scripts which depend on the old default timeout, use `-t 8` to
54
- get the old behavior. [#3968]
55
- * **Rails <5** is no longer supported. Rails 6+ only works in zeitwerk mode.
56
- * **Ruby <2.5** is no longer supported.
57
- * **Redis <4** is no longer supported.
58
-
59
- ## Upgrade
60
-
61
- As always, please upgrade Sidekiq **one major version at a time**.
62
- If you are already running Sidekiq 5.x, then:
63
-
64
- * Upgrade to the latest Sidekiq 5.x.
65
- ```ruby
66
- gem 'sidekiq', '< 6'
67
- ```
68
- * Fix any deprecation warnings you see.
69
- * Upgrade to 6.x.
70
- ```ruby
71
- gem 'sidekiq', '< 7'
72
- ```