diff --git a/Appraisals b/Appraisals index e9be7e73..c9c26ea5 100644 --- a/Appraisals +++ b/Appraisals @@ -2,6 +2,7 @@ ruby_30_or_higher = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0') ruby_31_or_higher = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1') +ruby_32_or_higher = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2') jruby = RUBY_PLATFORM.include?('java') unless ruby_31_or_higher # https://github.com/rails/rails/issues/44090#issuecomment-1007686519 @@ -38,11 +39,13 @@ if ruby_31_or_higher gem "rails", "~> 7.2.0.a" gem "selenium-webdriver", "~> 4.0" # https://github.com/rails/rails/pull/43498 end + end +end - appraise "rails-head" do - gem "capybara", "~> 3.36" # For Ruby 3.1 support https://github.com/teamcapybara/capybara/pull/24 - gem "rails", github: "rails/rails", branch: "main" - gem "selenium-webdriver", "~> 4.0" # https://github.com/rails/rails/pull/43498 - end +if ruby_32_or_higher && !jruby + appraise "rails-head" do + gem "capybara", "~> 3.36" # For Ruby 3.1 support https://github.com/teamcapybara/capybara/pull/24 + gem "rails", github: "rails/rails", branch: "main" + gem "selenium-webdriver", "~> 4.0" # https://github.com/rails/rails/pull/43498 end end diff --git a/app/models/good_job/job.rb b/app/models/good_job/job.rb index 8bbfebb8..063d1f5c 100644 --- a/app/models/good_job/job.rb +++ b/app/models/good_job/job.rb @@ -478,7 +478,7 @@ def retry_job current_thread.job = self current_thread.retry_now = true - self.class.transaction(joinable: false, requires_new: true) do + transaction do new_active_job = active_job.retry_job(wait: 0, error: error) self.error_event = :retried if error save!