2024-04-04 16:37:23 +02:00
|
|
|
SIDEKIQ_ENABLED = ENV.has_key?('REDIS_SIDEKIQ_SENTINELS') || ENV.has_key?('REDIS_URL')
|
2023-11-13 10:52:45 +01:00
|
|
|
|
2024-04-04 16:37:23 +02:00
|
|
|
if Rails.env.production? && SIDEKIQ_ENABLED
|
2023-11-13 10:52:45 +01:00
|
|
|
ActiveSupport.on_load(:after_initialize) do
|
|
|
|
class ActiveStorage::PurgeJob < ActiveStorage::BaseJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2023-11-21 16:13:32 +01:00
|
|
|
|
2024-03-27 11:29:58 +01:00
|
|
|
class ActiveStorage::AnalyzeJob < ActiveStorage::BaseJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
|
|
|
|
2023-11-21 16:13:32 +01:00
|
|
|
class VirusScannerJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2023-12-07 15:47:47 +01:00
|
|
|
|
|
|
|
class DossierRebaseJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-01-29 15:42:55 +01:00
|
|
|
|
|
|
|
class ProcedureExternalURLCheckJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-03-20 09:00:05 +01:00
|
|
|
|
|
|
|
class MaintenanceTasks::TaskJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-03-26 21:25:14 +01:00
|
|
|
|
|
|
|
class PriorizedMailDeliveryJob < ActionMailer::MailDeliveryJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-03-27 11:29:58 +01:00
|
|
|
|
|
|
|
class ProcedureSVASVRProcessDossierJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
|
|
|
|
2024-04-08 12:15:46 +02:00
|
|
|
class WebHookJob < ApplicationJob
|
2024-03-27 11:29:58 +01:00
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
|
|
|
|
|
|
|
class DestroyRecordLaterJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
|
|
|
|
|
|
|
class ChampFetchExternalDataJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
|
|
|
|
|
|
|
class DossierUpdateSearchTermsJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-04-04 16:28:57 +02:00
|
|
|
|
|
|
|
class Migrations::BackfillStableIdJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2024-04-08 18:27:20 +02:00
|
|
|
|
|
|
|
class Cron::CronJob < ApplicationJob
|
|
|
|
self.queue_adapter = :sidekiq
|
|
|
|
end
|
2023-11-13 10:52:45 +01:00
|
|
|
end
|
|
|
|
end
|