inst-jobs 0.15.17 → 0.15.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10580a9e748bdaf9facf0868524ca637d41096bfd8ac3f2f36771f985d964d1e
4
- data.tar.gz: daf4a10f872e7c51dadd12ff8e382c709de1cf84a56f3813395cc8d60392f664
3
+ metadata.gz: 1f5fa07aabb776db7b07347664cd263fae34426050ea23b72e2f35ef6a665f46
4
+ data.tar.gz: cfb860844d1a2c3654a8047f8c32331fab957f6fd1d5ac77f641f2704849d738
5
5
  SHA512:
6
- metadata.gz: 61beb13be5d8093922437ae2a56ce2fa70f2024d5a50657074801b9e3dc55793fa7382c1b417f9acd3189eba947949cd624687a28398e011ecf54f2d62c0f842
7
- data.tar.gz: 89a6665cf1bda550619daf224141d3b9e37c68daa7b4c9daa993e5751d10ae68c5ba5609b59c3822c6a3a4ce536475a4884b08f03a4a5392b986ca66e57f1cdc
6
+ metadata.gz: 9dd503fd8af0128fc999a78f96b199f759ea1c9df121f816ee72dd288d2e6bc6480b69bdece15f8f32c167e9785d18d9fb4b262abfd8459e08c12771d3dbe606
7
+ data.tar.gz: cb4f63db74b2cd05fde625c43e100c07cd66ded4f3b0998d97bb19786befde179180b85b1dd45d193254bdd010aba9e2ddaf67b549d0e8cdc0657853b99146ed
@@ -264,12 +264,14 @@ module Delayed
264
264
  # jobs in a single query.
265
265
  effective_worker_names = Array(worker_names)
266
266
 
267
+ lock = nil
268
+ lock = "FOR UPDATE SKIP LOCKED" if connection.postgresql_version >= 90500
267
269
  target_jobs = all_available(queue,
268
270
  min_priority,
269
271
  max_priority,
270
272
  forced_latency: forced_latency).
271
273
  limit(effective_worker_names.length + prefetch).
272
- lock
274
+ lock(lock)
273
275
  jobs_with_row_number = all.from(target_jobs).
274
276
  select("id, ROW_NUMBER() OVER () AS row_number")
275
277
  updates = "locked_by = CASE row_number "
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.15.17"
2
+ VERSION = "0.15.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inst-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.17
4
+ version: 0.15.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke