From c0136619a64c0a358839d17482db014cf9136be6 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Wed, 10 Jul 2024 09:38:11 -0700 Subject: [PATCH] Have `GoodJob.v4_ready?` check all migrations, not just discrete jobs --- lib/good_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/good_job.rb b/lib/good_job.rb index 09126c13..3d7cf880 100644 --- a/lib/good_job.rb +++ b/lib/good_job.rb @@ -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.