que-locks 0.4.0 → 0.4.1

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: 9d0ffcedfe00f4e3e4e6b609c345bfb8f5af2f13c31c7f21394e1e43c71458c1
4
- data.tar.gz: 80c89326dfbab470400c543be8760e4966103d1d781602db4135e903f1a38234
3
+ metadata.gz: c6bccc0c9272b0a0abede5268ac195ff4b1d92e662c78cbfb99546da131263f5
4
+ data.tar.gz: 598bf124abb4e762c6d2edf2a7c0cb0fae14f525b78b3e7ee1c4c45477ec13af
5
5
  SHA512:
6
- metadata.gz: 4eedc15d8acf9d9a37cb0ccda407b26c2d7505f259ccabac9d469c9862070a90bd592dd2f6b9dca16fa51bc967077ce12319cf82924a713d2c700d253c8ddf5a
7
- data.tar.gz: c4f436197a6546866b8b3d25441f5a548d007c1ae64c7adb218c9b95ea5792be4c68b88f4692cc862c4b32a2e8f56e30d26a4b87d23415b84c4e1755ac297367
6
+ metadata.gz: 5cf8ada967c4c8b7207c3911b9d439b8f68aa54b20fa8e3b38fa78120706fc146c30300e3aff9c22712b501f66dcb339c405acc3d94d0e98a54e77bd1826f0b4
7
+ data.tar.gz: 75cd869f5cbc63846cbf8aa3660c240d054759f11b14b11e11e4d2e5b9d2b6b7bb5963e8933471dd4fe6f0120d86fc8351be9980a0e38df92dce13f9130099cb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- que-locks (0.4.0)
4
+ que-locks (0.4.1)
5
5
  neatjson (~> 0.9)
6
6
  que (~> 1.0)
7
7
  xxhash (~> 0.4)
@@ -17,7 +17,13 @@ module Que::Locks
17
17
 
18
18
  def do_enqueue(job, **job_options)
19
19
  job_options[:priority] = job.priority if job.respond_to? :priority
20
- job_options[:queue] = job.queue_name if job.respond_to? :queue_name
20
+
21
+ # Forward the queue name as long as the job supports it, unless it's Rails 4
22
+ # where queue names were used for priorities (see
23
+ # https://github.com/rails/rails/pull/19498)
24
+ if job.respond_to?(:queue_name) && ::ActiveJob.version.segments.first > 4
25
+ job_options[:queue] = job.queue_name
26
+ end
21
27
 
22
28
  que_job = ExclusiveJobWrapper.enqueue job.serialize, job_options: job_options
23
29
  if que_job && job.respond_to?(:provider_job_id=)
@@ -1,5 +1,5 @@
1
1
  module Que
2
2
  module Locks
3
- VERSION = "0.4.0".freeze
3
+ VERSION = "0.4.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que-locks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Brundage