activejob 7.0.3.1 → 7.0.4.1

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: b52c57ec26b00940ffe64ac85b469cf455d8fec27c3fd2b117497b0109746677
4
- data.tar.gz: 69985eb16b795b0e76a34d2cd6b1903204df79ffc300242936eed6d12ede70cc
3
+ metadata.gz: 441c82e85c50add73b5cb9c0f1ce09a443fc01c69621c842bd17f8ffd33ada8e
4
+ data.tar.gz: dd4aef291cb1b7955371f7b270132618a1fa3ebfe189fbd1b5c2feaa2304daac
5
5
  SHA512:
6
- metadata.gz: ab63ae1b77d0faed85d5cfcd553b33936d1c7e8aa956ed01968231743e6c6fb23c6bfcdf28616f165bc1a4ac4d6ff51c5175026fd1769d325a549c94a6a5706f
7
- data.tar.gz: c9af2e154d909fa40f41ed9e5a716a1ed2dd297b02b8dbd226e1188da61207b16df94141b8e3c2a30f0c0ecea820119d6dbf4a7256325178936022edfe993f17
6
+ metadata.gz: 8fb9482b90a0a53804c3c251592d08d439bb578507da2db4828020f31262b983fd7670cd960c0d5167d223f8f1e973ab7a81916e4edb13680ce9ce23f067efa9
7
+ data.tar.gz: 95b365f6fe8d02bca883ca56e9aedcb2b1516e4bbadfbd50e8101cdee19092e3ddc4a1eef021dd0944b53d75fa66fa685c6671b52304270c71e79fee69d2d865
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## Rails 7.0.4.1 (January 17, 2023) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.4 (September 09, 2022) ##
7
+
8
+ * Update `ActiveJob::QueueAdapters::QueAdapter` to remove deprecation warning.
9
+
10
+ Remove a deprecation warning introduced in que 1.2 to prepare for changes in
11
+ que 2.0 necessary for Ruby 3 compatibility.
12
+
13
+ *Damir Zekic* and *Adis Hasovic*
14
+
1
15
  ## Rails 7.0.3.1 (July 12, 2022) ##
2
16
 
3
17
  * No changes.
@@ -28,7 +28,6 @@ module ActiveJob
28
28
  end
29
29
 
30
30
  included do
31
- class_attribute :return_false_on_aborted_enqueue, instance_accessor: false, instance_predicate: false, default: false
32
31
  cattr_accessor :skip_after_callbacks_if_terminated, instance_accessor: false, default: false
33
32
  singleton_class.deprecate :skip_after_callbacks_if_terminated, :skip_after_callbacks_if_terminated=
34
33
 
@@ -9,7 +9,7 @@ module ActiveJob
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 3
12
+ TINY = 4
13
13
  PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -18,22 +18,44 @@ module ActiveJob
18
18
  # Rails.application.config.active_job.queue_adapter = :que
19
19
  class QueAdapter
20
20
  def enqueue(job) # :nodoc:
21
- que_job = JobWrapper.enqueue job.serialize, priority: job.priority, queue: job.queue_name
21
+ job_options = { priority: job.priority, queue: job.queue_name }
22
+ que_job = nil
23
+
24
+ if require_job_options_kwarg?
25
+ que_job = JobWrapper.enqueue job.serialize, job_options: job_options
26
+ else
27
+ que_job = JobWrapper.enqueue job.serialize, **job_options
28
+ end
29
+
22
30
  job.provider_job_id = que_job.attrs["job_id"]
23
31
  que_job
24
32
  end
25
33
 
26
34
  def enqueue_at(job, timestamp) # :nodoc:
27
- que_job = JobWrapper.enqueue job.serialize, priority: job.priority, queue: job.queue_name, run_at: Time.at(timestamp)
35
+ job_options = { priority: job.priority, queue: job.queue_name, run_at: Time.at(timestamp) }
36
+ que_job = nil
37
+
38
+ if require_job_options_kwarg?
39
+ que_job = JobWrapper.enqueue job.serialize, job_options: job_options
40
+ else
41
+ que_job = JobWrapper.enqueue job.serialize, **job_options
42
+ end
43
+
28
44
  job.provider_job_id = que_job.attrs["job_id"]
29
45
  que_job
30
46
  end
31
47
 
32
- class JobWrapper < Que::Job # :nodoc:
33
- def run(job_data)
34
- Base.execute job_data
48
+ private
49
+ def require_job_options_kwarg?
50
+ @require_job_options_kwarg ||=
51
+ JobWrapper.method(:enqueue).parameters.any? { |ptype, pname| ptype == :key && pname == :job_options }
52
+ end
53
+
54
+ class JobWrapper < Que::Job # :nodoc:
55
+ def run(job_data)
56
+ Base.execute job_data
57
+ end
35
58
  end
36
- end
37
59
  end
38
60
  end
39
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.3.1
4
+ version: 7.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.0.3.1
19
+ version: 7.0.4.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.0.3.1
26
+ version: 7.0.4.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,10 +100,10 @@ licenses:
100
100
  - MIT
101
101
  metadata:
102
102
  bug_tracker_uri: https://github.com/rails/rails/issues
103
- changelog_uri: https://github.com/rails/rails/blob/v7.0.3.1/activejob/CHANGELOG.md
104
- documentation_uri: https://api.rubyonrails.org/v7.0.3.1/
103
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.4.1/activejob/CHANGELOG.md
104
+ documentation_uri: https://api.rubyonrails.org/v7.0.4.1/
105
105
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
106
- source_code_uri: https://github.com/rails/rails/tree/v7.0.3.1/activejob
106
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.4.1/activejob
107
107
  rubygems_mfa_required: 'true'
108
108
  post_install_message:
109
109
  rdoc_options: []
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.3.3
123
+ rubygems_version: 3.4.3
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Job framework with pluggable queues.