mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
22 lines
568 B
Ruby
22 lines
568 B
Ruby
|
module Sidekiq
|
||
|
module Extensions
|
||
|
|
||
|
def self.enable_delay!
|
||
|
if defined?(::ActiveSupport)
|
||
|
ActiveSupport.on_load(:active_record) do
|
||
|
require 'sidekiq/extensions/active_record'
|
||
|
include Sidekiq::Extensions::ActiveRecord
|
||
|
end
|
||
|
ActiveSupport.on_load(:action_mailer) do
|
||
|
require 'sidekiq/extensions/action_mailer'
|
||
|
extend Sidekiq::Extensions::ActionMailer
|
||
|
end
|
||
|
end
|
||
|
|
||
|
require 'sidekiq/extensions/class_methods'
|
||
|
Module.__send__(:include, Sidekiq::Extensions::Klass)
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|