activejob 7.2.0.beta2 → 7.2.0.rc1

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: 057cff5ad277f1a6ab50012193687a870dde25b7372d485aaae82695ddca5510
4
- data.tar.gz: 779f217f9223d263ca60d277eaee88769cab260c413700c77e70f405acff836d
3
+ metadata.gz: 0e4149b99b0cc5e7cc1aa053ab493503dbcb45b92587a69c254c624d8775d08e
4
+ data.tar.gz: 4af918c3127d0fa793c2c3fe94979ba94313e9f85fe42ccc966d778215156a53
5
5
  SHA512:
6
- metadata.gz: 65b567a628b0d84278753af6d4798db5f3c590c71bcd68cc365d3b61798340c4f4bf6aad9f7ddf75b7629ea893aec27c3570388cf76deaab67b6a2dd8e02f3f0
7
- data.tar.gz: cc9cd3e326d8ce24c3d1a367cbeb58109016bd4c36c92d61495f2cb68ac34bdcf74df7c06d0d42a1142758f3c3f06ae3a41768b543cd0fa61d9e5dc242403d34
6
+ metadata.gz: b8611ae0b59b2674cc33c748737e2ef6dbfc1edacd1b426e8b52a4b08312376ead8517f7afe81d4377cb9eebad3883f5b81ccb9715ddbc32b52580023e625a82
7
+ data.tar.gz: 0037332d0a6a6fe78bf820c4be563b087e834bb25f62eb9ee19385d929c6a1517b7d464b16033dd8aeb23a1447e9b29595d2de0138c600d78af9c80fe42885ae
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Rails 7.2.0.rc1 (August 06, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.2.0.beta3 (July 11, 2024) ##
7
+
8
+ * No changes.
9
+
10
+
1
11
  ## Rails 7.2.0.beta2 (June 04, 2024) ##
2
12
 
3
13
  * No changes.
@@ -2,22 +2,6 @@
2
2
 
3
3
  module ActiveJob
4
4
  module EnqueueAfterTransactionCommit # :nodoc:
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- ##
9
- # :singleton-method:
10
- #
11
- # Defines if enqueueing this job from inside an Active Record transaction
12
- # automatically defers the enqueue to after the transaction commits.
13
- #
14
- # It can be set on a per job basis:
15
- # - `:always` forces the job to be deferred.
16
- # - `:never` forces the job to be queued immediately.
17
- # - `:default` lets the queue adapter define the behavior (recommended).
18
- class_attribute :enqueue_after_transaction_commit, instance_accessor: false, instance_predicate: false, default: :never
19
- end
20
-
21
5
  private
22
6
  def raw_enqueue
23
7
  after_transaction = case self.class.enqueue_after_transaction_commit
@@ -40,6 +40,20 @@ module ActiveJob
40
40
  module Enqueuing
41
41
  extend ActiveSupport::Concern
42
42
 
43
+ included do
44
+ ##
45
+ # :singleton-method:
46
+ #
47
+ # Defines if enqueueing this job from inside an Active Record transaction
48
+ # automatically defers the enqueue to after the transaction commits.
49
+ #
50
+ # It can be set on a per job basis:
51
+ # - `:always` forces the job to be deferred.
52
+ # - `:never` forces the job to be queued immediately.
53
+ # - `:default` lets the queue adapter define the behavior (recommended).
54
+ class_attribute :enqueue_after_transaction_commit, instance_accessor: false, instance_predicate: false, default: :never
55
+ end
56
+
43
57
  # Includes the +perform_later+ method for job initialization.
44
58
  module ClassMethods
45
59
  # Push a job onto the queue. By default the arguments must be either String,
@@ -10,7 +10,7 @@ module ActiveJob
10
10
  MAJOR = 7
11
11
  MINOR = 2
12
12
  TINY = 0
13
- PRE = "beta2"
13
+ PRE = "rc1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -4,17 +4,31 @@ require "active_support/tagged_logging"
4
4
  require "active_support/logger"
5
5
 
6
6
  module ActiveJob
7
- module Logging # :nodoc:
7
+ module Logging
8
8
  extend ActiveSupport::Concern
9
9
 
10
10
  included do
11
+ ##
12
+ # Accepts a logger conforming to the interface of Log4r or the default
13
+ # Ruby +Logger+ class. You can retrieve this logger by calling +logger+ on
14
+ # either an Active Job job class or an Active Job job instance.
11
15
  cattr_accessor :logger, default: ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
16
+
17
+ ##
18
+ # Configures whether a job's arguments should be logged. This can be
19
+ # useful when a job's arguments may be sensitive and so should not be
20
+ # logged.
21
+ #
22
+ # The value defaults to +true+, but this can be configured with
23
+ # +config.active_job.log_arguments+. Additionally, individual jobs can
24
+ # also configure a value, which will apply to themselves and any
25
+ # subclasses.
12
26
  class_attribute :log_arguments, instance_accessor: false, default: true
13
27
 
14
28
  around_enqueue(prepend: true) { |_, block| tag_logger(&block) }
15
29
  end
16
30
 
17
- def perform_now
31
+ def perform_now # :nodoc:
18
32
  tag_logger(self.class.name, self.job_id) { super }
19
33
  end
20
34
 
@@ -26,14 +26,12 @@ module ActiveJob
26
26
  end
27
27
 
28
28
  initializer "active_job.enqueue_after_transaction_commit" do |app|
29
- if config.active_job.key?(:enqueue_after_transaction_commit)
30
- enqueue_after_transaction_commit = config.active_job.delete(:enqueue_after_transaction_commit)
31
-
29
+ ActiveSupport.on_load(:active_job) do
32
30
  ActiveSupport.on_load(:active_record) do
33
- ActiveSupport.on_load(:active_job) do
34
- include EnqueueAfterTransactionCommit
31
+ ActiveJob::Base.include EnqueueAfterTransactionCommit
35
32
 
36
- ActiveJob::Base.enqueue_after_transaction_commit = enqueue_after_transaction_commit
33
+ if app.config.active_job.key?(:enqueue_after_transaction_commit)
34
+ ActiveJob::Base.enqueue_after_transaction_commit = app.config.active_job.delete(:enqueue_after_transaction_commit)
37
35
  end
38
36
  end
39
37
  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.2.0.beta2
4
+ version: 7.2.0.rc1
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: 2024-06-04 00:00:00.000000000 Z
11
+ date: 2024-08-06 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.2.0.beta2
19
+ version: 7.2.0.rc1
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.2.0.beta2
26
+ version: 7.2.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: globalid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -104,10 +104,10 @@ licenses:
104
104
  - MIT
105
105
  metadata:
106
106
  bug_tracker_uri: https://github.com/rails/rails/issues
107
- changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta2/activejob/CHANGELOG.md
108
- documentation_uri: https://api.rubyonrails.org/v7.2.0.beta2/
107
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.0.rc1/activejob/CHANGELOG.md
108
+ documentation_uri: https://api.rubyonrails.org/v7.2.0.rc1/
109
109
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
110
- source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta2/activejob
110
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.0.rc1/activejob
111
111
  rubygems_mfa_required: 'true'
112
112
  post_install_message:
113
113
  rdoc_options: []
@@ -120,11 +120,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
120
  version: 3.1.0
121
121
  required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ">"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 1.3.1
125
+ version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.3.27
127
+ rubygems_version: 3.5.11
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Job framework with pluggable queues.