good_job 2.9.5 → 2.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c65c653e99d224dcc5803bd851fbc8891ecafd9634c68e4b0feaee08eafc1ed0
4
- data.tar.gz: 6b6d8a61555bfacdf6ba82e69afa48a3d05c1c9d9239770cea86878067151727
3
+ metadata.gz: 64642ab1c4e807f67310c70fca0d57ae636955b923dbf1c9a0e09a88a4c66a5d
4
+ data.tar.gz: 69a4d004af970032be6583bfd5a7281c3ee185dedbeb7250cb7d64d9adfc2d46
5
5
  SHA512:
6
- metadata.gz: 9135ae904e9031c97d9029af23d15b504b03383fbff4c43634416199a130d04ddafbd121ababe7f9675d997d1b5be8db37d098e060f4a51193035abe087052c8
7
- data.tar.gz: 30235ec67f81832b6c9b7401a01c7e167d239fef9d38b5be4d83d56c98cb061bb8737432092bce7e18e7136f67c4df14dc917f83c227f3d0e83b578b9fe58468
6
+ metadata.gz: 9c154d015c820d314a4f2b7e7b611d4d858c75950bdef0fbde8d89b7264271b85a43669607e274ea1eca46234e603d48a441fb7a291b6a1969f8c5fb3896bf86
7
+ data.tar.gz: 5d9534cc68b264fe3901f447383de0265d301ddea893b435b39542575f2b16410569a4442ddb5a5187e803546cf721e3cf1e49a1f81a3c4439f59c4b46b42249
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.9.6](https://github.com/bensheldon/good_job/tree/v2.9.6) (2022-02-07)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.9.5...v2.9.6)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Limit query for allowed concurrent jobs to unfinished [\#515](https://github.com/bensheldon/good_job/pull/515) ([til](https://github.com/til))
10
+
3
11
  ## [v2.9.5](https://github.com/bensheldon/good_job/tree/v2.9.5) (2022-02-07)
4
12
 
5
13
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.9.4...v2.9.5)
@@ -62,7 +62,7 @@ module GoodJob
62
62
  next if key.blank?
63
63
 
64
64
  GoodJob::Execution.advisory_lock_key(key, function: "pg_advisory_lock") do
65
- allowed_active_job_ids = GoodJob::Execution.where(concurrency_key: key).advisory_locked.order(Arel.sql("COALESCE(performed_at, scheduled_at, created_at) ASC")).limit(perform_limit).pluck(:active_job_id)
65
+ allowed_active_job_ids = GoodJob::Execution.unfinished.where(concurrency_key: key).advisory_locked.order(Arel.sql("COALESCE(performed_at, scheduled_at, created_at) ASC")).limit(perform_limit).pluck(:active_job_id)
66
66
  # The current job has already been locked and will appear in the previous query
67
67
  raise GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError unless allowed_active_job_ids.include? job.job_id
68
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '2.9.5'
4
+ VERSION = '2.9.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.5
4
+ version: 2.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon