diff --git a/config/initializers/transition_to_sidekiq.rb b/config/initializers/transition_to_sidekiq.rb index 7f319a64c..c9a537362 100644 --- a/config/initializers/transition_to_sidekiq.rb +++ b/config/initializers/transition_to_sidekiq.rb @@ -1,6 +1,6 @@ -sidekiq_enabled = ENV.has_key?('REDIS_SIDEKIQ_SENTINELS') || ENV.has_key?('REDIS_URL') +SIDEKIQ_ENABLED = ENV.has_key?('REDIS_SIDEKIQ_SENTINELS') || ENV.has_key?('REDIS_URL') -if Rails.env.production? && sidekiq_enabled +if Rails.env.production? && SIDEKIQ_ENABLED ActiveSupport.on_load(:after_initialize) do class ActiveStorage::PurgeJob < ActiveStorage::BaseJob self.queue_adapter = :sidekiq