define SIDEKIQ_ENABLE constant
This commit is contained in:
parent
d08803d17a
commit
e06fb54655
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue