1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Update supported Ruby and Rails versions, fixes #3318

This commit is contained in:
Mike Perham 2017-01-17 13:02:06 -08:00
parent dc6204d76c
commit 74a4c50e60
4 changed files with 7 additions and 9 deletions

View file

@ -7,13 +7,12 @@ better with the new Rails 5.0 Executor.
* Integrate the job logging and retry logic directly in with the job * Integrate the job logging and retry logic directly in with the job
execution logic in Sidekiq::Processor. Previously this logic was execution logic in Sidekiq::Processor. Previously this logic was
defined as middleware. Rails's Executor handles ActiveRecord defined as middleware. In Rails 5.0, ActiveSupport::Executor handles ActiveRecord
connection management, job callbacks, development mode class loading, connection management, job callbacks, development mode class loading,
etc. Because of its extensive responsibilities, the Executor can't be etc. Because of its extensive responsibilities, the Executor can't be
integrated as Sidekiq middleware; the logging/retry logic had to be pulled out integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
too. Sidekiq 4.2 had a hack to make it work but this redesign provides too. Sidekiq 4.2 had a hack to make it work but this redesign provides
a cleaner integration. [#3235] a cleaner integration. [#3235]
* The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
no longer available by default. The extensions allow you to marshal no longer available by default. The extensions allow you to marshal
job arguments as YAML, leading to cases where job payloads could be many job arguments as YAML, leading to cases where job payloads could be many
@ -26,11 +25,12 @@ better with the new Rails 5.0 Executor.
Sidekiq::Extensions.enable_delay! Sidekiq::Extensions.enable_delay!
``` ```
The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299] The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299]
* Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread * Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread
**ST**o**P**) instead of USR1 as USR1 is not available on JRuby. **ST**o**P**) instead of USR1 as USR1 is not available on JRuby.
USR1 will continue to be supported in Sidekiq 5.x for backwards USR1 will continue to be supported in Sidekiq 5.x for backwards
compatibility and will be removed in Sidekiq 6.x. [#3302] compatibility and will be removed in Sidekiq 6.x. [#3302]
* Rails 3.2 is no longer supported.
* Ruby 2.0 and Ruby 2.1 are no longer supported. Ruby 2.2.2+ is required.
## Upgrade ## Upgrade

View file

@ -32,9 +32,9 @@ DelayedJob 4.1.1 | - | - | 465 sec | 215 jobs/sec
Requirements Requirements
----------------- -----------------
Sidekiq supports CRuby 2.0+ and JRuby 9k. Sidekiq supports CRuby 2.2.2+ and JRuby 9k.
All Rails releases >= 3.2 are officially supported. All Rails releases >= 4.0 are officially supported.
Redis 2.8 or greater is required. 3.0.3+ is recommended for large Redis 2.8 or greater is required. 3.0.3+ is recommended for large
installations with thousands of worker threads. installations with thousands of worker threads.

View file

@ -1,7 +1,7 @@
# encoding: utf-8 # encoding: utf-8
# frozen_string_literal: true # frozen_string_literal: true
require 'sidekiq/version' require 'sidekiq/version'
fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.0.0." if RUBY_PLATFORM != 'java' && RUBY_VERSION < '2.0.0' fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.2.2." if RUBY_PLATFORM != 'java' && RUBY_VERSION < '2.2.2'
require 'sidekiq/logging' require 'sidekiq/logging'
require 'sidekiq/client' require 'sidekiq/client'

View file

@ -240,9 +240,7 @@ module Sidekiq
if File.directory?(options[:require]) if File.directory?(options[:require])
require 'rails' require 'rails'
if ::Rails::VERSION::MAJOR < 4 if ::Rails::VERSION::MAJOR < 4
require 'sidekiq/rails' raise "Sidekiq no longer supports this version of Rails"
require File.expand_path("#{options[:require]}/config/environment.rb")
::Rails.application.eager_load!
elsif ::Rails::VERSION::MAJOR == 4 elsif ::Rails::VERSION::MAJOR == 4
# Painful contortions, see 1791 for discussion # Painful contortions, see 1791 for discussion
# No autoloading, we want to force eager load for everything. # No autoloading, we want to force eager load for everything.