activejob 7.0.0.rc3 → 7.0.2.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: 76df0430ea7f5eadb7780020ffc50c075fdc64b39a3cda073da2bfe4f44a2e58
4
- data.tar.gz: 53d24d3b2274f2546ce40986ba8e8bacd4afd1b3c5fc809b98562bbe51cec989
3
+ metadata.gz: 75d49d6731b2701f48d44a712581b60094922d721563d8a45c7d2887434c0fda
4
+ data.tar.gz: 062a4d0fbf57397634c6ea25500637eb07a254783e51722dab6eb4f7f1859282
5
5
  SHA512:
6
- metadata.gz: 3971cc1118a54d061425cbb011f0c1a77d7dc06b892be34f3b692c6644495346dbbdfdc30fd4daba59ea8c2dc0f4c23a45c6e5222999eae202aecd8e6bca405f
7
- data.tar.gz: 490a6b13ef22e5a380208ff3bf9c74f81713efe159a26a3730cc9550d4664a4ee99f7970641c02d0e9b2dc0ddcfa0f192229c20913379ae82e8c1a17c2f50ea8
6
+ metadata.gz: d2890a1ebf9edb1c649d225775b15ffd8d811c591c047166f0d0d972d9acbbfe8c89d280580f8c012a465be6c76a5b2ede7562554fc4c5a84160b84f221c6354
7
+ data.tar.gz: 59699f3c16c26cd12fb6745b088273ec5dc06925b3c33cf83a5d60e035805e0bbe5cd16660ef0921c71c4854c84ee65b8476c9e33d5f458f94ea82979cc8e8cc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ ## Rails 7.0.2.1 (February 11, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.2 (February 08, 2022) ##
7
+
8
+ * No changes.
9
+
10
+
11
+ ## Rails 7.0.1 (January 06, 2022) ##
12
+
13
+ * Allow testing `discard_on/retry_on ActiveJob::DeserializationError`
14
+
15
+ Previously in `perform_enqueued_jobs`, `deserialize_arguments_if_needed`
16
+ was called before calling `perform_now`. When a record no longer exists
17
+ and is serialized using GlobalID this led to raising
18
+ an `ActiveJob::DeserializationError` before reaching `perform_now` call.
19
+ This behaviour makes difficult testing the job `discard_on/retry_on` logic.
20
+
21
+ Now `deserialize_arguments_if_needed` call is postponed to when `perform_now`
22
+ is called.
23
+
24
+ Example:
25
+
26
+ ```ruby
27
+ class UpdateUserJob < ActiveJob::Base
28
+ discard_on ActiveJob::DeserializationError
29
+
30
+ def perform(user)
31
+ # ...
32
+ end
33
+ end
34
+
35
+ # In the test
36
+ User.destroy_all
37
+ assert_nothing_raised do
38
+ perform_enqueued_jobs only: UpdateUserJob
39
+ end
40
+ ```
41
+
42
+ *Jacopo Beschi*
43
+
44
+
45
+ ## Rails 7.0.0 (December 15, 2021) ##
46
+
47
+ * No changes.
48
+
49
+
1
50
  ## Rails 7.0.0.rc3 (December 14, 2021) ##
2
51
 
3
52
  * No changes.
@@ -5,6 +54,10 @@
5
54
 
6
55
  ## Rails 7.0.0.rc2 (December 14, 2021) ##
7
56
 
57
+ * No changes.
58
+
59
+ ## Rails 7.0.0.rc1 (December 06, 2021) ##
60
+
8
61
  * Remove deprecated `:return_false_on_aborted_enqueue` option.
9
62
 
10
63
  *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 = "rc3"
12
+ TINY = 2
13
+ PRE = "1"
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.rc3
4
+ version: 7.0.2.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: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-02-11 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.rc3
19
+ version: 7.0.2.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.0.rc3
26
+ version: 7.0.2.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.0.rc3/activejob/CHANGELOG.md
104
- documentation_uri: https://api.rubyonrails.org/v7.0.0.rc3/
103
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2.1/activejob/CHANGELOG.md
104
+ documentation_uri: https://api.rubyonrails.org/v7.0.2.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.0.rc3/activejob
106
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2.1/activejob
107
107
  rubygems_mfa_required: 'true'
108
108
  post_install_message:
109
109
  rdoc_options: []
@@ -116,11 +116,11 @@ 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
123
+ rubygems_version: 3.2.22
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Job framework with pluggable queues.