lib/good_job/configuration.rb in good_job-3.6.2 vs lib/good_job/configuration.rb in good_job-3.7.0

- old
+ new

@@ -219,43 +219,41 @@ rails_config[:queue_select_limit] || env['GOOD_JOB_QUEUE_SELECT_LIMIT'] )&.to_i end - # Whether to destroy discarded jobs when cleaning up preserved jobs. - # This configuration is only used when {GoodJob.preserve_job_records} is +true+. + # Whether to automatically destroy discarded jobs that have been preserved. # @return [Boolean] def cleanup_discarded_jobs? return rails_config[:cleanup_discarded_jobs] unless rails_config[:cleanup_discarded_jobs].nil? return ActiveModel::Type::Boolean.new.cast(env['GOOD_JOB_CLEANUP_DISCARDED_JOBS']) unless env['GOOD_JOB_CLEANUP_DISCARDED_JOBS'].nil? true end - # Number of seconds to preserve jobs when using the +good_job cleanup_preserved_jobs+ CLI command. - # This configuration is only used when {GoodJob.preserve_job_records} is +true+. + # Number of seconds to preserve jobs before automatic destruction. # @return [Integer] def cleanup_preserved_jobs_before_seconds_ago ( options[:before_seconds_ago] || rails_config[:cleanup_preserved_jobs_before_seconds_ago] || env['GOOD_JOB_CLEANUP_PRESERVED_JOBS_BEFORE_SECONDS_AGO'] || DEFAULT_CLEANUP_PRESERVED_JOBS_BEFORE_SECONDS_AGO ).to_i end - # Number of jobs a {Scheduler} will execute before cleaning up preserved jobs. + # Number of jobs a {Scheduler} will execute before automatically cleaning up preserved jobs. # @return [Integer, nil] def cleanup_interval_jobs value = ( rails_config[:cleanup_interval_jobs] || env['GOOD_JOB_CLEANUP_INTERVAL_JOBS'] || DEFAULT_CLEANUP_INTERVAL_JOBS ) value.present? ? value.to_i : nil end - # Number of seconds a {Scheduler} will wait before cleaning up preserved jobs. + # Number of seconds a {Scheduler} will wait before automatically cleaning up preserved jobs. # @return [Integer, nil] def cleanup_interval_seconds value = ( rails_config[:cleanup_interval_seconds] || env['GOOD_JOB_CLEANUP_INTERVAL_SECONDS'] ||