activejob 7.0.8.7 → 7.0.10
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/active_job/callbacks.rb +2 -1
- data/lib/active_job/exceptions.rb +6 -0
- data/lib/active_job/gem_version.rb +2 -2
- data/lib/active_job/serializers/time_with_zone_serializer.rb +11 -2
- data/lib/active_job/test_helper.rb +4 -9
- metadata +8 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be497ec8b1f22b64d821aa595f4a62e69d92d4f04bb066f8eab468e96a148d9a
|
|
4
|
+
data.tar.gz: 2a7b3b1d6e9246ebed53c5f853b65ec02da56f8d41bee74f8da8fb33887dbb02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14380a3a6c88fb7e1f3107decd71dc21c57fd242f058ada819da1825931986b404cb17ab185ea49b386a62b29cbed72a2020402e033588cab0ba216c33ead411
|
|
7
|
+
data.tar.gz: e57990031c726247763c650f293daabaaa95c57c361ae2c5b43db1d6ffc65a457a168b84b07d840158a16c5de5416fa09a133a51cc9c5ef986676d618123f420
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## Rails 7.0.10 (October 28, 2025) ##
|
|
2
|
+
|
|
3
|
+
* No changes.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Rails 7.0.9 (October 28, 2025) ##
|
|
7
|
+
|
|
8
|
+
* Preserve the serialized timezone when deserializing `ActiveSupport::TimeWithZone` arguments.
|
|
9
|
+
|
|
10
|
+
*Joshua Young*
|
|
11
|
+
|
|
12
|
+
|
|
1
13
|
## Rails 7.0.8.7 (December 10, 2024) ##
|
|
2
14
|
|
|
3
15
|
* No changes.
|
data/lib/active_job/callbacks.rb
CHANGED
|
@@ -135,7 +135,8 @@ module ActiveJob
|
|
|
135
135
|
# queue_as :default
|
|
136
136
|
#
|
|
137
137
|
# after_enqueue do |job|
|
|
138
|
-
#
|
|
138
|
+
# result = job.successfully_enqueued? ? "success" : "failure"
|
|
139
|
+
# $statsd.increment "enqueue-video-job.#{result}"
|
|
139
140
|
# end
|
|
140
141
|
#
|
|
141
142
|
# def perform(video_id)
|
|
@@ -20,6 +20,9 @@ module ActiveJob
|
|
|
20
20
|
# You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting
|
|
21
21
|
# the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
|
22
22
|
#
|
|
23
|
+
# `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
|
|
24
|
+
# which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
|
|
25
|
+
#
|
|
23
26
|
# ==== Options
|
|
24
27
|
# * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
|
|
25
28
|
# as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of
|
|
@@ -78,6 +81,9 @@ module ActiveJob
|
|
|
78
81
|
#
|
|
79
82
|
# You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
|
80
83
|
#
|
|
84
|
+
# `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for
|
|
85
|
+
# which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if any.
|
|
86
|
+
#
|
|
81
87
|
# ==== Example
|
|
82
88
|
#
|
|
83
89
|
# class SearchIndexingJob < ActiveJob::Base
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module ActiveJob
|
|
4
4
|
module Serializers
|
|
5
|
-
class TimeWithZoneSerializer <
|
|
5
|
+
class TimeWithZoneSerializer < ObjectSerializer # :nodoc:
|
|
6
|
+
NANO_PRECISION = 9
|
|
7
|
+
|
|
8
|
+
def serialize(time_with_zone)
|
|
9
|
+
super(
|
|
10
|
+
"value" => time_with_zone.iso8601(NANO_PRECISION),
|
|
11
|
+
"time_zone" => time_with_zone.time_zone.tzinfo.name
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
6
15
|
def deserialize(hash)
|
|
7
|
-
Time.iso8601(hash["value"]).in_time_zone
|
|
16
|
+
Time.iso8601(hash["value"]).in_time_zone(hash["time_zone"] || Time.zone)
|
|
8
17
|
end
|
|
9
18
|
|
|
10
19
|
private
|
|
@@ -54,15 +54,10 @@ module ActiveJob
|
|
|
54
54
|
queue_adapter_changed_jobs.each { |klass| klass.disable_test_adapter }
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
# ActiveJob::QueueAdapters::TestAdapter.
|
|
61
|
-
#
|
|
62
|
-
# Note: The adapter provided by this method must provide some additional
|
|
63
|
-
# methods from those expected of a standard ActiveJob::QueueAdapter
|
|
64
|
-
# in order to be used with the active job test helpers. Refer to
|
|
65
|
-
# ActiveJob::QueueAdapters::TestAdapter.
|
|
57
|
+
# Returns a queue adapter instance to use with all Active Job test helpers.
|
|
58
|
+
# By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter.
|
|
59
|
+
# Override this method to specify a different adapter. The adapter must
|
|
60
|
+
# implement the same interface as ActiveJob::QueueAdapters::TestAdapter.
|
|
66
61
|
def queue_adapter_for_test
|
|
67
62
|
ActiveJob::QueueAdapters::TestAdapter.new
|
|
68
63
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activejob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0.
|
|
4
|
+
version: 7.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - '='
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 7.0.
|
|
18
|
+
version: 7.0.10
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - '='
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 7.0.
|
|
25
|
+
version: 7.0.10
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: globalid
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,12 +99,11 @@ licenses:
|
|
|
100
99
|
- MIT
|
|
101
100
|
metadata:
|
|
102
101
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
103
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
|
104
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
|
102
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.10/activejob/CHANGELOG.md
|
|
103
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.10/
|
|
105
104
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
106
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
|
105
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.10/activejob
|
|
107
106
|
rubygems_mfa_required: 'true'
|
|
108
|
-
post_install_message:
|
|
109
107
|
rdoc_options: []
|
|
110
108
|
require_paths:
|
|
111
109
|
- lib
|
|
@@ -120,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
118
|
- !ruby/object:Gem::Version
|
|
121
119
|
version: '0'
|
|
122
120
|
requirements: []
|
|
123
|
-
rubygems_version: 3.
|
|
124
|
-
signing_key:
|
|
121
|
+
rubygems_version: 3.6.9
|
|
125
122
|
specification_version: 4
|
|
126
123
|
summary: Job framework with pluggable queues.
|
|
127
124
|
test_files: []
|