Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Jul 9, 2024
1 parent 9fdc30a commit 47b9233
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/judoscale-good_job-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions judoscale-good_job/test/metrics_collector_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 47b9233

Please sign in to comment.