Skip to content

Commit

Permalink
Have GoodJob.v4_ready? check all migrations, not just discrete jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Jul 10, 2024
1 parent 06e0f06 commit c013661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/good_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def self.perform_inline(queue_string = "*", limit: nil)
# Tests whether GoodJob can be safely upgraded to v4
# @return [Boolean]
def self.v4_ready?
GoodJob::Job.discrete_support? && GoodJob::Job.where(finished_at: nil).where(is_discrete: [nil, false]).none?
GoodJob.migrated? && GoodJob::Job.discrete_support? && GoodJob::Job.where(finished_at: nil).where(is_discrete: [nil, false]).none?
end

# Deprecator for providing deprecation warnings.
Expand Down

0 comments on commit c013661

Please sign in to comment.