activejob 7.0.0.rc2 → 7.0.2

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: 17cac455c9915a33b6647a99cdf8b6a8a8618b7c4a239a91ec82b39cde3cb0e2
4
- data.tar.gz: ba1ef66717563ae404620dfe54944321303838a2d07a88d74e0994b9a1fc5282
3
+ metadata.gz: 4403ec113f52c4df0acf46ad547becd13481a01187c9194621a6e76a9375b78d
4
+ data.tar.gz: 8c967ccdc27a9966642cdc0bda31728293c37748f0d8fa6a98bf6b1eb9382113
5
5
  SHA512:
6
- metadata.gz: d794eac83e855f9528dab58acd501e2cd46b19656d0616746c9e9c082207587865bad42e54198412115696a0d5aa205a9ed4fe393eac18477d791cdabd878fdb
7
- data.tar.gz: 69aa85dbcfa9621c225ee97a761352e45eaf55b41ebf4c5a9898d6eb18a36769c5ae0c3c5b207bf131cb0f60c5aef04ea9cf9c71803d4835cfdabc33624e31e9
6
+ metadata.gz: e781c3c0d98797922e56bd35346d501178f9e3c26aa5c1306eaaa712625a7294bcac1a2ae001508de604cab380b895bb725cdec3b7709ae4da9a272a93a754f7
7
+ data.tar.gz: 1e7e244b9dcfb6e10d0f47b523da797b927876627bfbcf64aced3dc2ecea5e753f02978d4cdfa8f3b06c9cc36efd51ed2f956788fa6fbb8f78ed90d78ef462bc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
+ ## Rails 7.0.2 (February 08, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.1 (January 06, 2022) ##
7
+
8
+ * Allow testing `discard_on/retry_on ActiveJob::DeserializationError`
9
+
10
+ Previously in `perform_enqueued_jobs`, `deserialize_arguments_if_needed`
11
+ was called before calling `perform_now`. When a record no longer exists
12
+ and is serialized using GlobalID this led to raising
13
+ an `ActiveJob::DeserializationError` before reaching `perform_now` call.
14
+ This behaviour makes difficult testing the job `discard_on/retry_on` logic.
15
+
16
+ Now `deserialize_arguments_if_needed` call is postponed to when `perform_now`
17
+ is called.
18
+
19
+ Example:
20
+
21
+ ```ruby
22
+ class UpdateUserJob < ActiveJob::Base
23
+ discard_on ActiveJob::DeserializationError
24
+
25
+ def perform(user)
26
+ # ...
27
+ end
28
+ end
29
+
30
+ # In the test
31
+ User.destroy_all
32
+ assert_nothing_raised do
33
+ perform_enqueued_jobs only: UpdateUserJob
34
+ end
35
+ ```
36
+
37
+ *Jacopo Beschi*
38
+
39
+
40
+ ## Rails 7.0.0 (December 15, 2021) ##
41
+
42
+ * No changes.
43
+
44
+
45
+ ## Rails 7.0.0.rc3 (December 14, 2021) ##
46
+
47
+ * No changes.
48
+
49
+
1
50
  ## Rails 7.0.0.rc2 (December 14, 2021) ##
2
51
 
52
+ * No changes.
53
+
54
+ ## Rails 7.0.0.rc1 (December 06, 2021) ##
55
+
3
56
  * Remove deprecated `:return_false_on_aborted_enqueue` option.
4
57
 
5
58
  *Rafael Mendonça França*
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2021 David Heinemeier Hansson
1
+ Copyright (c) 2014-2022 David Heinemeier Hansson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -9,8 +9,8 @@ module ActiveJob
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 0
13
- PRE = "rc2"
12
+ TINY = 2
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -688,7 +688,7 @@ module ActiveJob
688
688
  enqueued_jobs_with(only: only, except: except, queue: queue, at: at) do |payload|
689
689
  queue_adapter.enqueued_jobs.delete(payload)
690
690
  queue_adapter.performed_jobs << payload
691
- instantiate_job(payload).perform_now
691
+ instantiate_job(payload, skip_deserialize_arguments: true).perform_now
692
692
  end.count
693
693
  end
694
694
 
@@ -708,10 +708,10 @@ module ActiveJob
708
708
  end
709
709
  end
710
710
 
711
- def instantiate_job(payload)
711
+ def instantiate_job(payload, skip_deserialize_arguments: false)
712
712
  job = payload[:job].deserialize(payload)
713
713
  job.scheduled_at = Time.at(payload[:at]) if payload.key?(:at)
714
- job.send(:deserialize_arguments_if_needed)
714
+ job.send(:deserialize_arguments_if_needed) unless skip_deserialize_arguments
715
715
  job
716
716
  end
717
717
 
data/lib/active_job.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #--
4
- # Copyright (c) 2014-2021 David Heinemeier Hansson
4
+ # Copyright (c) 2014-2022 David Heinemeier Hansson
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining
7
7
  # a copy of this software and associated documentation files (the
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.0.rc2
4
+ version: 7.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-02-08 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.0.rc2
19
+ version: 7.0.2
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.0.rc2
26
+ version: 7.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,12 +100,12 @@ 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.0.rc2/activejob/CHANGELOG.md
104
- documentation_uri: https://api.rubyonrails.org/v7.0.0.rc2/
103
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2/activejob/CHANGELOG.md
104
+ documentation_uri: https://api.rubyonrails.org/v7.0.2/
105
105
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
106
- source_code_uri: https://github.com/rails/rails/tree/v7.0.0.rc2/activejob
106
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2/activejob
107
107
  rubygems_mfa_required: 'true'
108
- post_install_message:
108
+ post_install_message:
109
109
  rdoc_options: []
110
110
  require_paths:
111
111
  - lib
@@ -116,12 +116,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  version: 2.7.0
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - ">"
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: 1.3.1
121
+ version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.2.15
124
- signing_key:
123
+ rubygems_version: 3.2.32
124
+ signing_key:
125
125
  specification_version: 4
126
126
  summary: Job framework with pluggable queues.
127
127
  test_files: []