activejob 7.2.3 → 8.0.5
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 +32 -62
- data/lib/active_job/core.rb +10 -2
- data/lib/active_job/enqueue_after_transaction_commit.rb +18 -2
- data/lib/active_job/enqueuing.rb +3 -4
- data/lib/active_job/gem_version.rb +3 -3
- data/lib/active_job/log_subscriber.rb +7 -3
- data/lib/active_job/queue_adapter.rb +1 -0
- data/lib/active_job/queue_adapters/abstract_adapter.rb +0 -8
- data/lib/active_job/queue_adapters/async_adapter.rb +1 -1
- data/lib/active_job/queue_adapters/delayed_job_adapter.rb +0 -8
- data/lib/active_job/queue_adapters/inline_adapter.rb +0 -4
- data/lib/active_job/queue_adapters/queue_classic_adapter.rb +0 -8
- data/lib/active_job/queue_adapters/sucker_punch_adapter.rb +7 -0
- data/lib/active_job/queue_adapters/test_adapter.rb +1 -9
- data/lib/active_job/queue_adapters.rb +0 -3
- data/lib/active_job/railtie.rb +21 -3
- data/lib/active_job/serializers.rb +0 -2
- data/lib/active_job.rb +0 -12
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 789e176d52fcec2b2fd1844b522f6170f828f45519ed3a1c6144708ef20ec79c
|
|
4
|
+
data.tar.gz: 5a9d5a887191cfb1771c66877a8ebda6c7e694c835b9818a089f1e43cb33bd92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c31ceaadaaac30f5018fad38d7361404aa0bfc1f7beed8c406954ed5cf971ad79fb9c5e212b234fdb9aa615e96700d7a0f5808fce576e457841f5afe52cee5a
|
|
7
|
+
data.tar.gz: 2df4827639124add7e8ddcf54e2345068e9edc89b9a03d89c5bfb2f47a6aeea5993bf6b4caa69eebb8b5d4cea4561fc840ad07874b410fce5fe0d9a3bef94c1c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,111 +1,81 @@
|
|
|
1
|
-
## Rails
|
|
1
|
+
## Rails 8.0.5 (March 24, 2026) ##
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*Adrien S*
|
|
6
|
-
|
|
7
|
-
* Avoid crashing in Active Job logger when logging enqueueing errors
|
|
8
|
-
|
|
9
|
-
`ActiveJob.perform_all_later` could fail with a `TypeError` when all
|
|
10
|
-
provided jobs failed to be enqueueed.
|
|
11
|
-
|
|
12
|
-
*Efstathios Stivaros*
|
|
3
|
+
* No changes.
|
|
13
4
|
|
|
14
5
|
|
|
15
|
-
## Rails
|
|
6
|
+
## Rails 8.0.4.1 (March 23, 2026) ##
|
|
16
7
|
|
|
17
8
|
* No changes.
|
|
18
9
|
|
|
19
10
|
|
|
20
|
-
## Rails
|
|
11
|
+
## Rails 8.0.4 (October 28, 2025) ##
|
|
21
12
|
|
|
22
13
|
* No changes.
|
|
23
14
|
|
|
24
15
|
|
|
25
|
-
## Rails
|
|
16
|
+
## Rails 8.0.3 (September 22, 2025) ##
|
|
26
17
|
|
|
27
|
-
*
|
|
18
|
+
* Include the actual Active Job locale when serializing rather than I18n locale.
|
|
28
19
|
|
|
20
|
+
*Adrien S*
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
* Fix `retry_job` instrumentation when using `:test` adapter for Active Job.
|
|
31
23
|
|
|
32
|
-
*
|
|
24
|
+
*fatkodima*
|
|
33
25
|
|
|
34
26
|
|
|
35
|
-
## Rails
|
|
27
|
+
## Rails 8.0.2.1 (August 13, 2025) ##
|
|
36
28
|
|
|
37
29
|
* No changes.
|
|
38
30
|
|
|
39
31
|
|
|
40
|
-
## Rails
|
|
32
|
+
## Rails 8.0.2 (March 12, 2025) ##
|
|
41
33
|
|
|
42
34
|
* No changes.
|
|
43
35
|
|
|
44
36
|
|
|
45
|
-
## Rails
|
|
46
|
-
|
|
47
|
-
* All tests now respect the `active_job.queue_adapter` config.
|
|
37
|
+
## Rails 8.0.1 (December 13, 2024) ##
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
or `config/environments/test.rb` file, the adapter you selected was previously not used consistently
|
|
51
|
-
across all tests. In some tests your adapter would be used, but other tests would use the `TestAdapter`.
|
|
52
|
-
|
|
53
|
-
In Rails 7.2, all tests will respect the `queue_adapter` config if provided. If no config is provided,
|
|
54
|
-
the `TestAdapter` will continue to be used.
|
|
39
|
+
* Avoid crashing in Active Job logger when logging enqueueing errors
|
|
55
40
|
|
|
56
|
-
|
|
41
|
+
`ActiveJob.perform_all_later` could fail with a `TypeError` when all
|
|
42
|
+
provided jobs failed to be enqueueed.
|
|
57
43
|
|
|
58
|
-
*
|
|
44
|
+
*Efstathios Stivaros*
|
|
59
45
|
|
|
60
|
-
* Make Active Job transaction aware when used conjointly with Active Record.
|
|
61
46
|
|
|
62
|
-
|
|
63
|
-
causing them to potentially be picked and ran by another process, before the
|
|
64
|
-
transaction is committed, which may result in various errors.
|
|
47
|
+
## Rails 8.0.0.1 (December 10, 2024) ##
|
|
65
48
|
|
|
66
|
-
|
|
67
|
-
Topic.transaction do
|
|
68
|
-
topic = Topic.create(...)
|
|
69
|
-
NewTopicNotificationJob.perform_later(topic)
|
|
70
|
-
end
|
|
71
|
-
```
|
|
49
|
+
* No changes.
|
|
72
50
|
|
|
73
|
-
Now Active Job will automatically defer the enqueuing to after the transaction is committed,
|
|
74
|
-
and drop the job if the transaction is rolled back.
|
|
75
51
|
|
|
76
|
-
|
|
77
|
-
or force it on a per job basis:
|
|
52
|
+
## Rails 8.0.0 (November 07, 2024) ##
|
|
78
53
|
|
|
79
|
-
|
|
80
|
-
class NewTopicNotificationJob < ApplicationJob
|
|
81
|
-
self.enqueue_after_transaction_commit = :never # or `:always` or `:default`
|
|
82
|
-
end
|
|
83
|
-
```
|
|
54
|
+
* No changes.
|
|
84
55
|
|
|
85
|
-
*Jean Boussier*, *Cristian Bica*
|
|
86
56
|
|
|
87
|
-
|
|
57
|
+
## Rails 8.0.0.rc2 (October 30, 2024) ##
|
|
88
58
|
|
|
89
|
-
|
|
59
|
+
* No changes.
|
|
90
60
|
|
|
91
|
-
* Preserve the serialized timezone when deserializing `ActiveSupport::TimeWithZone` arguments.
|
|
92
61
|
|
|
93
|
-
|
|
62
|
+
## Rails 8.0.0.rc1 (October 19, 2024) ##
|
|
94
63
|
|
|
95
|
-
* Remove deprecated
|
|
64
|
+
* Remove deprecated `config.active_job.use_big_decimal_serializer`.
|
|
96
65
|
|
|
97
66
|
*Rafael Mendonça França*
|
|
98
67
|
|
|
99
|
-
* Remove deprecated support to set numeric values to `scheduled_at` attribute.
|
|
100
68
|
|
|
101
|
-
|
|
69
|
+
## Rails 8.0.0.beta1 (September 26, 2024) ##
|
|
102
70
|
|
|
103
|
-
* Deprecate `
|
|
71
|
+
* Deprecate `sucker_punch` as an adapter option.
|
|
104
72
|
|
|
105
|
-
|
|
73
|
+
If you're using this adapter, change to `adapter: async` for the same functionality.
|
|
106
74
|
|
|
107
|
-
*
|
|
75
|
+
*Dino Maric, zzak*
|
|
108
76
|
|
|
109
|
-
|
|
77
|
+
* Use `RAILS_MAX_THREADS` in `ActiveJob::AsyncAdapter`. If it is not set, use 5 as default.
|
|
78
|
+
|
|
79
|
+
*heka1024*
|
|
110
80
|
|
|
111
|
-
Please check [7-
|
|
81
|
+
Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/activejob/CHANGELOG.md) for previous changes.
|
data/lib/active_job/core.rb
CHANGED
|
@@ -157,8 +157,8 @@ module ActiveJob
|
|
|
157
157
|
self.exception_executions = job_data["exception_executions"]
|
|
158
158
|
self.locale = job_data["locale"] || I18n.locale.to_s
|
|
159
159
|
self.timezone = job_data["timezone"] || Time.zone&.name
|
|
160
|
-
self.enqueued_at =
|
|
161
|
-
self.scheduled_at =
|
|
160
|
+
self.enqueued_at = deserialize_time(job_data["enqueued_at"]) if job_data["enqueued_at"]
|
|
161
|
+
self.scheduled_at = deserialize_time(job_data["scheduled_at"]) if job_data["scheduled_at"]
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
# Configures the job with the given options.
|
|
@@ -198,5 +198,13 @@ module ActiveJob
|
|
|
198
198
|
def arguments_serialized?
|
|
199
199
|
@serialized_arguments
|
|
200
200
|
end
|
|
201
|
+
|
|
202
|
+
def deserialize_time(time)
|
|
203
|
+
if time.is_a?(Time)
|
|
204
|
+
time
|
|
205
|
+
else
|
|
206
|
+
Time.iso8601(time)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
201
209
|
end
|
|
202
210
|
end
|
|
@@ -4,13 +4,29 @@ module ActiveJob
|
|
|
4
4
|
module EnqueueAfterTransactionCommit # :nodoc:
|
|
5
5
|
private
|
|
6
6
|
def raw_enqueue
|
|
7
|
+
enqueue_after_transaction_commit = self.class.enqueue_after_transaction_commit
|
|
8
|
+
|
|
7
9
|
after_transaction = case self.class.enqueue_after_transaction_commit
|
|
8
10
|
when :always
|
|
11
|
+
ActiveJob.deprecator.warn(<<~MSG.squish)
|
|
12
|
+
Setting `#{self.class.name}.enqueue_after_transaction_commit = :always` is deprecated and will be removed in Rails 8.1.
|
|
13
|
+
Set to `true` to always enqueue the job after the transaction is committed.
|
|
14
|
+
MSG
|
|
9
15
|
true
|
|
10
16
|
when :never
|
|
17
|
+
ActiveJob.deprecator.warn(<<~MSG.squish)
|
|
18
|
+
Setting `#{self.class.name}.enqueue_after_transaction_commit = :never` is deprecated and will be removed in Rails 8.1.
|
|
19
|
+
Set to `false` to never enqueue the job after the transaction is committed.
|
|
20
|
+
MSG
|
|
21
|
+
false
|
|
22
|
+
when :default
|
|
23
|
+
ActiveJob.deprecator.warn(<<~MSG.squish)
|
|
24
|
+
Setting `#{self.class.name}.enqueue_after_transaction_commit = :default` is deprecated and will be removed in Rails 8.1.
|
|
25
|
+
Set to `false` to never enqueue the job after the transaction is committed.
|
|
26
|
+
MSG
|
|
11
27
|
false
|
|
12
|
-
else
|
|
13
|
-
|
|
28
|
+
else
|
|
29
|
+
enqueue_after_transaction_commit
|
|
14
30
|
end
|
|
15
31
|
|
|
16
32
|
if after_transaction
|
data/lib/active_job/enqueuing.rb
CHANGED
|
@@ -48,10 +48,9 @@ module ActiveJob
|
|
|
48
48
|
# automatically defers the enqueue to after the transaction commits.
|
|
49
49
|
#
|
|
50
50
|
# It can be set on a per job basis:
|
|
51
|
-
# -
|
|
52
|
-
# -
|
|
53
|
-
|
|
54
|
-
class_attribute :enqueue_after_transaction_commit, instance_accessor: false, instance_predicate: false, default: :never
|
|
51
|
+
# - true forces the job to be deferred.
|
|
52
|
+
# - false forces the job to be queued immediately.
|
|
53
|
+
class_attribute :enqueue_after_transaction_commit, instance_accessor: false, instance_predicate: false, default: false
|
|
55
54
|
end
|
|
56
55
|
|
|
57
56
|
# Includes the +perform_later+ method for job initialization.
|
|
@@ -189,15 +189,19 @@ module ActiveJob
|
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
def log_enqueue_source
|
|
192
|
-
source =
|
|
192
|
+
source = enqueue_source_location
|
|
193
193
|
|
|
194
194
|
if source
|
|
195
195
|
logger.info("↳ #{source}")
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
def
|
|
200
|
-
|
|
199
|
+
def enqueue_source_location
|
|
200
|
+
Thread.each_caller_location do |location|
|
|
201
|
+
frame = backtrace_cleaner.clean_frame(location)
|
|
202
|
+
return frame if frame
|
|
203
|
+
end
|
|
204
|
+
nil
|
|
201
205
|
end
|
|
202
206
|
|
|
203
207
|
def enqueued_jobs_message(adapter, enqueued_jobs)
|
|
@@ -50,6 +50,7 @@ module ActiveJob
|
|
|
50
50
|
case name_or_adapter
|
|
51
51
|
when Symbol, String
|
|
52
52
|
queue_adapter = ActiveJob::QueueAdapters.lookup(name_or_adapter).new
|
|
53
|
+
queue_adapter.try(:check_adapter)
|
|
53
54
|
assign_adapter(name_or_adapter.to_s, queue_adapter)
|
|
54
55
|
else
|
|
55
56
|
if queue_adapter?(name_or_adapter)
|
|
@@ -7,14 +7,6 @@ module ActiveJob
|
|
|
7
7
|
# Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter
|
|
8
8
|
# forms the abstraction layer which makes this possible.
|
|
9
9
|
class AbstractAdapter
|
|
10
|
-
# Defines whether enqueuing should happen implicitly to after commit when called
|
|
11
|
-
# from inside a transaction. Most adapters should return true, but some adapters
|
|
12
|
-
# that use the same database as Active Record and are transaction aware can return
|
|
13
|
-
# false to continue enqueuing jobs as part of the transaction.
|
|
14
|
-
def enqueue_after_transaction_commit?
|
|
15
|
-
true
|
|
16
|
-
end
|
|
17
|
-
|
|
18
10
|
def enqueue(job)
|
|
19
11
|
raise NotImplementedError
|
|
20
12
|
end
|
|
@@ -74,7 +74,7 @@ module ActiveJob
|
|
|
74
74
|
class Scheduler # :nodoc:
|
|
75
75
|
DEFAULT_EXECUTOR_OPTIONS = {
|
|
76
76
|
min_threads: 0,
|
|
77
|
-
max_threads:
|
|
77
|
+
max_threads: ENV.fetch("RAILS_MAX_THREADS", 5).to_i,
|
|
78
78
|
auto_terminate: true,
|
|
79
79
|
idletime: 60, # 1 minute
|
|
80
80
|
max_queue: 0, # unlimited
|
|
@@ -16,14 +16,6 @@ module ActiveJob
|
|
|
16
16
|
#
|
|
17
17
|
# Rails.application.config.active_job.queue_adapter = :delayed_job
|
|
18
18
|
class DelayedJobAdapter < AbstractAdapter
|
|
19
|
-
def initialize(enqueue_after_transaction_commit: false)
|
|
20
|
-
@enqueue_after_transaction_commit = enqueue_after_transaction_commit
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def enqueue_after_transaction_commit? # :nodoc:
|
|
24
|
-
@enqueue_after_transaction_commit
|
|
25
|
-
end
|
|
26
|
-
|
|
27
19
|
def enqueue(job) # :nodoc:
|
|
28
20
|
delayed_job = Delayed::Job.enqueue(JobWrapper.new(job.serialize), queue: job.queue_name, priority: job.priority)
|
|
29
21
|
job.provider_job_id = delayed_job.id
|
|
@@ -11,10 +11,6 @@ module ActiveJob
|
|
|
11
11
|
#
|
|
12
12
|
# Rails.application.config.active_job.queue_adapter = :inline
|
|
13
13
|
class InlineAdapter < AbstractAdapter
|
|
14
|
-
def enqueue_after_transaction_commit? # :nodoc:
|
|
15
|
-
false
|
|
16
|
-
end
|
|
17
|
-
|
|
18
14
|
def enqueue(job) # :nodoc:
|
|
19
15
|
Base.execute(job.serialize)
|
|
20
16
|
end
|
|
@@ -19,14 +19,6 @@ module ActiveJob
|
|
|
19
19
|
#
|
|
20
20
|
# Rails.application.config.active_job.queue_adapter = :queue_classic
|
|
21
21
|
class QueueClassicAdapter < AbstractAdapter
|
|
22
|
-
def initialize(enqueue_after_transaction_commit: false)
|
|
23
|
-
@enqueue_after_transaction_commit = enqueue_after_transaction_commit
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def enqueue_after_transaction_commit? # :nodoc:
|
|
27
|
-
@enqueue_after_transaction_commit
|
|
28
|
-
end
|
|
29
|
-
|
|
30
22
|
def enqueue(job) # :nodoc:
|
|
31
23
|
qc_job = build_queue(job.queue_name).enqueue("#{JobWrapper.name}.perform", job.serialize)
|
|
32
24
|
job.provider_job_id = qc_job["id"] if qc_job.is_a?(Hash)
|
|
@@ -18,6 +18,13 @@ module ActiveJob
|
|
|
18
18
|
#
|
|
19
19
|
# Rails.application.config.active_job.queue_adapter = :sucker_punch
|
|
20
20
|
class SuckerPunchAdapter < AbstractAdapter
|
|
21
|
+
def check_adapter
|
|
22
|
+
ActiveJob.deprecator.warn <<~MSG.squish
|
|
23
|
+
The `sucker_punch` adapter is deprecated and will be removed in Rails 8.1.
|
|
24
|
+
Please use the `async` adapter instead.
|
|
25
|
+
MSG
|
|
26
|
+
end
|
|
27
|
+
|
|
21
28
|
def enqueue(job) # :nodoc:
|
|
22
29
|
if JobWrapper.respond_to?(:perform_async)
|
|
23
30
|
# sucker_punch 2.0 API
|
|
@@ -12,17 +12,9 @@ module ActiveJob
|
|
|
12
12
|
#
|
|
13
13
|
# Rails.application.config.active_job.queue_adapter = :test
|
|
14
14
|
class TestAdapter < AbstractAdapter
|
|
15
|
-
attr_accessor(:perform_enqueued_jobs, :perform_enqueued_at_jobs, :filter, :reject, :queue, :at
|
|
15
|
+
attr_accessor(:perform_enqueued_jobs, :perform_enqueued_at_jobs, :filter, :reject, :queue, :at)
|
|
16
16
|
attr_writer(:enqueued_jobs, :performed_jobs)
|
|
17
17
|
|
|
18
|
-
def initialize(enqueue_after_transaction_commit: true)
|
|
19
|
-
@enqueue_after_transaction_commit = enqueue_after_transaction_commit
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def enqueue_after_transaction_commit? # :nodoc:
|
|
23
|
-
@enqueue_after_transaction_commit
|
|
24
|
-
end
|
|
25
|
-
|
|
26
18
|
# Provides a store of all the enqueued jobs with the TestAdapter so you can check them.
|
|
27
19
|
def enqueued_jobs
|
|
28
20
|
@enqueued_jobs ||= []
|
|
@@ -12,7 +12,6 @@ module ActiveJob
|
|
|
12
12
|
# * {Resque}[https://github.com/resque/resque]
|
|
13
13
|
# * {Sidekiq}[https://sidekiq.org]
|
|
14
14
|
# * {Sneakers}[https://github.com/jondot/sneakers]
|
|
15
|
-
# * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch]
|
|
16
15
|
# * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details.
|
|
17
16
|
#
|
|
18
17
|
# For testing and development Active Job has three built-in adapters:
|
|
@@ -32,7 +31,6 @@ module ActiveJob
|
|
|
32
31
|
# | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes |
|
|
33
32
|
# | Sidekiq | Yes | Yes | Yes | Queue | No | Job |
|
|
34
33
|
# | Sneakers | Yes | Yes | No | Queue | Queue | No |
|
|
35
|
-
# | Sucker Punch | Yes | Yes | Yes | No | No | No |
|
|
36
34
|
# | Active Job Async | Yes | Yes | Yes | No | No | No |
|
|
37
35
|
# | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A |
|
|
38
36
|
# | Active Job Test | No | Yes | N/A | N/A | N/A | N/A |
|
|
@@ -119,7 +117,6 @@ module ActiveJob
|
|
|
119
117
|
autoload :InlineAdapter
|
|
120
118
|
autoload :BackburnerAdapter
|
|
121
119
|
autoload :DelayedJobAdapter
|
|
122
|
-
autoload :QueAdapter
|
|
123
120
|
autoload :QueueClassicAdapter
|
|
124
121
|
autoload :ResqueAdapter
|
|
125
122
|
autoload :SidekiqAdapter
|
data/lib/active_job/railtie.rb
CHANGED
|
@@ -31,7 +31,22 @@ module ActiveJob
|
|
|
31
31
|
ActiveJob::Base.include EnqueueAfterTransactionCommit
|
|
32
32
|
|
|
33
33
|
if app.config.active_job.key?(:enqueue_after_transaction_commit)
|
|
34
|
-
ActiveJob
|
|
34
|
+
ActiveJob.deprecator.warn(<<~MSG.squish)
|
|
35
|
+
`config.active_job.enqueue_after_transaction_commit` is deprecated and will be removed in Rails 8.1.
|
|
36
|
+
This configuration can still be set on individual jobs using `self.enqueue_after_transaction_commit=`,
|
|
37
|
+
but due the nature of this behavior, it is not recommended to be set globally.
|
|
38
|
+
MSG
|
|
39
|
+
|
|
40
|
+
value = case app.config.active_job.enqueue_after_transaction_commit
|
|
41
|
+
when :always
|
|
42
|
+
true
|
|
43
|
+
when :never
|
|
44
|
+
false
|
|
45
|
+
else
|
|
46
|
+
false
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
ActiveJob::Base.enqueue_after_transaction_commit = value
|
|
35
50
|
end
|
|
36
51
|
end
|
|
37
52
|
end
|
|
@@ -54,7 +69,8 @@ module ActiveJob
|
|
|
54
69
|
# Configs used in other initializers
|
|
55
70
|
options = options.except(
|
|
56
71
|
:log_query_tags_around_perform,
|
|
57
|
-
:custom_serializers
|
|
72
|
+
:custom_serializers,
|
|
73
|
+
:enqueue_after_transaction_commit
|
|
58
74
|
)
|
|
59
75
|
|
|
60
76
|
options.each do |k, v|
|
|
@@ -91,7 +107,9 @@ module ActiveJob
|
|
|
91
107
|
app.config.active_record.query_log_tags |= [:job]
|
|
92
108
|
|
|
93
109
|
ActiveSupport.on_load(:active_record) do
|
|
94
|
-
ActiveRecord::QueryLogs.taggings
|
|
110
|
+
ActiveRecord::QueryLogs.taggings = ActiveRecord::QueryLogs.taggings.merge(
|
|
111
|
+
job: ->(context) { context[:job].class.name if context[:job] }
|
|
112
|
+
)
|
|
95
113
|
end
|
|
96
114
|
end
|
|
97
115
|
end
|
data/lib/active_job.rb
CHANGED
|
@@ -49,18 +49,6 @@ module ActiveJob
|
|
|
49
49
|
autoload :TestCase
|
|
50
50
|
autoload :TestHelper
|
|
51
51
|
|
|
52
|
-
def self.use_big_decimal_serializer
|
|
53
|
-
ActiveJob.deprecator.warn <<-WARNING.squish
|
|
54
|
-
Rails.application.config.active_job.use_big_decimal_serializer is deprecated and will be removed in Rails 8.0.
|
|
55
|
-
WARNING
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def self.use_big_decimal_serializer=(value)
|
|
59
|
-
ActiveJob.deprecator.warn <<-WARNING.squish
|
|
60
|
-
Rails.application.config.active_job.use_big_decimal_serializer is deprecated and will be removed in Rails 8.0.
|
|
61
|
-
WARNING
|
|
62
|
-
end
|
|
63
|
-
|
|
64
52
|
##
|
|
65
53
|
# :singleton-method: verbose_enqueue_logs
|
|
66
54
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activejob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 8.0.5
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
25
|
+
version: 8.0.5
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: globalid
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -103,10 +103,10 @@ licenses:
|
|
|
103
103
|
- MIT
|
|
104
104
|
metadata:
|
|
105
105
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
106
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
|
107
|
-
documentation_uri: https://api.rubyonrails.org/
|
|
106
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.0.5/activejob/CHANGELOG.md
|
|
107
|
+
documentation_uri: https://api.rubyonrails.org/v8.0.5/
|
|
108
108
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
109
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
|
109
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.0.5/activejob
|
|
110
110
|
rubygems_mfa_required: 'true'
|
|
111
111
|
rdoc_options: []
|
|
112
112
|
require_paths:
|
|
@@ -115,14 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
115
115
|
requirements:
|
|
116
116
|
- - ">="
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: 3.
|
|
118
|
+
version: 3.2.0
|
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0'
|
|
124
124
|
requirements: []
|
|
125
|
-
rubygems_version:
|
|
125
|
+
rubygems_version: 4.0.6
|
|
126
126
|
specification_version: 4
|
|
127
127
|
summary: Job framework with pluggable queues.
|
|
128
128
|
test_files: []
|