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

22 lines
568 B
Ruby
Raw Normal View History

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