bensheldon/good_job · error

Calling `GoodJob.v4_ready?` is deprecated and will be remove

Error message

Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5.
If you are reading this deprecation you are already on v4.

What it means

Error "Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5. If you are reading this deprecation you are already on v4." thrown in bensheldon/good_job.

Source

Thrown at lib/good_job.rb:298

  # @return [void]
  def self.perform_inline(queue_string = "*", limit: nil)
    job_performer = JobPerformer.new(queue_string)
    iteration = 0
    loop do
      break if limit && iteration >= limit

      result = Rails.application.executor.wrap { job_performer.next }
      break unless result
      raise result.unhandled_error if result.unhandled_error

      iteration += 1
    end
  end

  # Tests whether GoodJob can be safely upgraded to v4
  # @return [Boolean]
  def self.v4_ready?
    GoodJob.deprecator.warn(<<~MSG)
      Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5.
      If you are reading this deprecation you are already on v4.
    MSG
    true
  end

  # Deprecator for providing deprecation warnings.
  # @return [ActiveSupport::Deprecation]
  def self.deprecator
    @_deprecator ||= begin
      next_major_version = GEM_VERSION.segments[0] + 1
      ActiveSupport::Deprecation.new("#{next_major_version}.0", "GoodJob")
    end
  end

  # Whether all GoodJob migrations have been applied.
  # For use in tests/CI to validate GoodJob is up-to-date.
  # @return [Boolean]

View on GitHub (pinned to 5fcde48f87)

Solutions

  1. Stop calling GoodJob.v4_ready?; you are already on v4.
  2. Remove the v4_ready? guard from your code.

Example fix

# Delete the GoodJob.v4_ready? check entirely

When it happens

Trigger: Thrown at lib/good_job.rb:298 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bensheldon/good_job@5fcde48f87 (2026-08-23). Data as JSON: /api/errors/edfbb217787ebeee. Report an issue: GitHub.