lib/good_job/execution.rb in good_job-2.7.4 vs lib/good_job/execution.rb in good_job-2.8.0

- old
+ new

@@ -1,12 +1,9 @@ # frozen_string_literal: true module GoodJob # ActiveRecord model that represents an +ActiveJob+ job. - # Parent class can be configured with +GoodJob.active_record_parent_class+. - # @!parse - # class Execution < ActiveRecord::Base; end - class Execution < Object.const_get(GoodJob.active_record_parent_class) + class Execution < BaseRecord include Lockable include Filterable # Raised if something attempts to execute a previously completed Execution again. PreviouslyPerformedError = Class.new(StandardError) @@ -52,20 +49,10 @@ else { include: queues } end end - def self._migration_pending_warning - ActiveSupport::Deprecation.warn(<<~DEPRECATION) - GoodJob has pending database migrations. To create the migration files, run: - rails generate good_job:update - To apply the migration files, run: - rails db:migrate - DEPRECATION - nil - end - # Get Jobs with given ActiveJob ID # @!method active_job_id # @!scope class # @param active_job_id [String] # ActiveJob ID @@ -222,10 +209,10 @@ @cron_at_index = column_names.include?('cron_at') && connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_cron_at) unless instance_variable_defined?(:@cron_at_index) if @cron_at_index execution_args[:cron_at] = CurrentThread.cron_at else - _migration_pending_warning + migration_pending_warning! end elsif CurrentThread.active_job_id && CurrentThread.active_job_id == active_job.job_id execution_args[:cron_key] = CurrentThread.execution.cron_key end