{"record":{"id":"edfbb217787ebeee","repo":"bensheldon/good_job","slug":"calling-goodjob-v4-ready-is-deprecated-and-will","errorCode":null,"errorMessage":"Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5.\nIf you are reading this deprecation you are already on v4.","messagePattern":"Calling `GoodJob\\.v4_ready\\?` is deprecated and will be removed in GoodJob v5\\.\nIf you are reading this deprecation you are already on v4\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/good_job.rb","lineNumber":298,"sourceCode":"  # @return [void]\n  def self.perform_inline(queue_string = \"*\", limit: nil)\n    job_performer = JobPerformer.new(queue_string)\n    iteration = 0\n    loop do\n      break if limit && iteration >= limit\n\n      result = Rails.application.executor.wrap { job_performer.next }\n      break unless result\n      raise result.unhandled_error if result.unhandled_error\n\n      iteration += 1\n    end\n  end\n\n  # Tests whether GoodJob can be safely upgraded to v4\n  # @return [Boolean]\n  def self.v4_ready?\n    GoodJob.deprecator.warn(<<~MSG)\n      Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5.\n      If you are reading this deprecation you are already on v4.\n    MSG\n    true\n  end\n\n  # Deprecator for providing deprecation warnings.\n  # @return [ActiveSupport::Deprecation]\n  def self.deprecator\n    @_deprecator ||= begin\n      next_major_version = GEM_VERSION.segments[0] + 1\n      ActiveSupport::Deprecation.new(\"#{next_major_version}.0\", \"GoodJob\")\n    end\n  end\n\n  # Whether all GoodJob migrations have been applied.\n  # For use in tests/CI to validate GoodJob is up-to-date.\n  # @return [Boolean]","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/lib/good_job.rb#L280-L316","documentation":"Error \"Calling `GoodJob.v4_ready?` is deprecated and will be removed in GoodJob v5.\nIf you are reading this deprecation you are already on v4.\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at lib/good_job.rb:298 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Stop calling GoodJob.v4_ready?; you are already on v4.","Remove the v4_ready? guard from your code."],"exampleFix":"# Delete the GoodJob.v4_ready? check entirely","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}