lib/good_job.rb in good_job-2.1.0 vs lib/good_job.rb in good_job-2.2.0

- old
+ new

@@ -18,11 +18,11 @@ # # +GoodJob+ is the top-level namespace and exposes configuration attributes. module GoodJob # @!attribute [rw] active_record_parent_class # @!scope class - # The ActiveRecord parent class inherited by +GoodJob::Job+ (default: +ActiveRecord::Base+). + # The ActiveRecord parent class inherited by +GoodJob::Execution+ (default: +ActiveRecord::Base+). # Use this when using multiple databases or other custom ActiveRecord configuration. # @return [ActiveRecord::Base] # @example Change the base class: # GoodJob.active_record_parent_class = "CustomApplicationRecord" mattr_accessor :active_record_parent_class, default: "ActiveRecord::Base" @@ -127,10 +127,10 @@ def self.cleanup_preserved_jobs(older_than: nil) older_than ||= GoodJob::Configuration.new({}).cleanup_preserved_jobs_before_seconds_ago timestamp = Time.current - older_than ActiveSupport::Notifications.instrument("cleanup_preserved_jobs.good_job", { older_than: older_than, timestamp: timestamp }) do |payload| - deleted_records_count = GoodJob::Job.finished(timestamp).delete_all + deleted_records_count = GoodJob::Execution.finished(timestamp).delete_all payload[:deleted_records_count] = deleted_records_count end end