diff --git a/.github/workflows/judoscale-good_job-test.yml b/.github/workflows/judoscale-good_job-test.yml index 5a4a20d..d36ab30 100644 --- a/.github/workflows/judoscale-good_job-test.yml +++ b/.github/workflows/judoscale-good_job-test.yml @@ -28,7 +28,7 @@ jobs: ruby: "2.6" - gemfile: Gemfile-activerecord-7-0 ruby: "2.6" - # GoodJob v4+ dropped support to Ruby 2.6/2.7, we test it against these Gemfiles. + # GoodJob v4+ dropped support for Ruby 2.6/2.7, we test it against these Gemfiles. - gemfile: Gemfile ruby: "2.7" - gemfile: Gemfile-activerecord-7-0 diff --git a/judoscale-good_job/test/metrics_collector_test.rb b/judoscale-good_job/test/metrics_collector_test.rb index 8f5cf68..a9510fa 100644 --- a/judoscale-good_job/test/metrics_collector_test.rb +++ b/judoscale-good_job/test/metrics_collector_test.rb @@ -145,8 +145,8 @@ def clear_enqueued_jobs Delayable.set(queue: "default").perform_later metrics = nil ::GoodJob::JobPerformer.new("default").next do |execution| - # GoodJob v3 queries `GoodJob::Execution.running` scope, which uses `performed_at` in the condition, - # so we set it here. v4 uses `GoodJob::Job.running` scope, joined with the advisory lock instead. + # Support GoodJob v3 query/scope `GoodJob::Execution.running`, which filters by `performed_at`. + # v4 scope `GoodJob::Job.running` joins with the advisory lock created by `JobPerformer#next` instead. execution.update!(performed_at: Time.now.utc) metrics = subject.collect @@ -164,8 +164,8 @@ def clear_enqueued_jobs use_adapter_config :good_job, track_busy_jobs: true do Delayable.set(queue: "default").perform_later ::GoodJob::JobPerformer.new("default").next do |execution| - # GoodJob v3 queries `GoodJob::Execution.running` scope, which uses `performed_at` in the condition, - # so we set it here. v4 uses `GoodJob::Job.running` scope, joined with the advisory lock instead. + # Support GoodJob v3 query/scope `GoodJob::Execution.running`, which filters by `performed_at`. + # v4 scope `GoodJob::Job.running` joins with the advisory lock created by `JobPerformer#next` instead. execution.update!(performed_at: Time.now.utc) subject.collect