lib/good_job/configuration.rb in good_job-3.15.6 vs lib/good_job/configuration.rb in good_job-3.15.7
- old
+ new
@@ -248,24 +248,24 @@
# @return [Integer, nil]
def cleanup_interval_jobs
if rails_config.key?(:cleanup_interval_jobs)
value = rails_config[:cleanup_interval_jobs]
if value.nil?
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `config.good_job.cleanup_interval_jobs` to `nil` will no longer disable count-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
)
value = false
elsif value == 0 # rubocop:disable Style/NumericPredicate
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `config.good_job.cleanup_interval_jobs` to `0` will disable count-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
)
value = -1
end
elsif env.key?('GOOD_JOB_CLEANUP_INTERVAL_JOBS')
value = env['GOOD_JOB_CLEANUP_INTERVAL_JOBS']
if value.blank?
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `GOOD_JOB_CLEANUP_INTERVAL_JOBS` to `""` will no longer disable count-based cleanups in GoodJob v4. Set to `0` to disable, or `-1` to run every time.)
)
value = false
elsif value == '0'
value = false
@@ -283,23 +283,23 @@
def cleanup_interval_seconds
if rails_config.key?(:cleanup_interval_seconds)
value = rails_config[:cleanup_interval_seconds]
if value.nil?
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `config.good_job.cleanup_interval_seconds` to `nil` will no longer disable time-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
)
value = false
elsif value == 0 # rubocop:disable Style/NumericPredicate
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `config.good_job.cleanup_interval_seconds` to `0` will disable time-based cleanups in GoodJob v4. Set to `false` to disable, or `-1` to run every time.)
)
value = -1
end
elsif env.key?('GOOD_JOB_CLEANUP_INTERVAL_SECONDS')
value = env['GOOD_JOB_CLEANUP_INTERVAL_SECONDS']
if value.blank?
- ActiveSupport::Deprecation.warn(
+ GoodJob.deprecator.warn(
%(Setting `GOOD_JOB_CLEANUP_INTERVAL_SECONDS` to `""` will no longer disable time-based cleanups in GoodJob v4. Set to `0` to disable, or `-1` to run every time.)
)
value = false
elsif value == '0'
value = false