Fix autoloading deprecation warning in delayed job initializer.

DEPRECATION WARNING: Initialization autoloaded the constants
    Danbooru::Paginator and Danbooru::Paginator::ActiveRecordExtension.

    Being able to do this is deprecated. Autoloading during
    initialization is going to be an error condition in future versions
    of Rails.

    Reloading does not reboot the application, and therefore code
    executed during initialization does not run again. So, if you reload
    Danbooru::Paginator, for example, the expected changes won't be
    reflected in that stale Module object.

    `config.autoloader` is set to `classic`. These autoloaded constants
    would have been unloaded if `config.autoloader` had been set to
    `:zeitwerk`.

    Please, check the "Autoloading and Reloading Constants" guide for
    solutions.
This commit is contained in:
evazion
2019-09-01 13:10:37 -05:00
parent 648ba14021
commit 1bb1b147ea

View File

@@ -1,4 +1,5 @@
require 'delayed/plugin'
require 'danbooru/paginator/active_record_extension'
class DelayedJobTimeoutPlugin < ::Delayed::Plugin
callbacks do |lifecycle|