docs/6.0-Upgrade.md
Sidekiq 6.0 contains some breaking changes which streamline proper operation of Sidekiq. It also drops support for EOL versions of Ruby and Rails.
This release has major breaking changes. Read and test carefully in production.
sidekiq_options directly to configure Sidekiq
features/internals like the retry subsystem. Prefer the native
Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
(requires Rails 6.0.2)class MyJob < ActiveJob::Base
queue_as :myqueue
sidekiq_options retry: 10, backtrace: 20
def perform(...)
end
end
Sidekiq will enable the best formatter for the detected environment but you can override it by configuring the log formatter explicitly. See 'sidekiq/logger' for implementation details.
Sidekiq.configure_server do |config|
config.log_formatter = AcmeCorp::PlainLogFormatter.new
# config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
end
Please see the Logging wiki page for the latest documentation and notes.
sidekiqctl binary.
I've noted for years
how modern services should be managed with a proper init system.
Managing services manually is more error-prone, let your operating system do it for you.
systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.REDIS_PROVIDER variable.
This variable is meant to hold the name of the environment
variable which contains your Redis URL, so that you can switch Redis
providers quickly and easily with a single variable change. It is not
meant to hold the actual Redis URL itself. If you want to manually set
the Redis URL then you may set REDIS_URL directly. [#3969]-t 8 to
get the old behavior. [#3968]As always, please upgrade Sidekiq one major version at a time. If you are already running Sidekiq 5.x, then:
gem 'sidekiq', '< 6'
gem 'sidekiq', '< 7'