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
Mike Perham cc59d07e48 Disable delay extensions by default, fixes #3174 (#3299)
* Disable delay extensions by default, fixes #3174

* Size check for YAML payload

* so racy

* Allow larger, explicit size in message

* Polish
2017-01-04 10:30:42 -08:00

21 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