mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove passing extra arguments to ActiveJob Callbacks
This commit is contained in:
parent
f85c77bef9
commit
6a1e7292bc
3 changed files with 4 additions and 4 deletions
|
@ -11,13 +11,13 @@ module ActiveJob
|
|||
included do
|
||||
cattr_accessor :logger, default: ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
|
||||
|
||||
around_enqueue do |_, block, _|
|
||||
around_enqueue do |_, block|
|
||||
tag_logger do
|
||||
block.call
|
||||
end
|
||||
end
|
||||
|
||||
around_perform do |job, block, _|
|
||||
around_perform do |job, block|
|
||||
tag_logger(job.class.name, job.job_id) do
|
||||
payload = { adapter: job.class.queue_adapter, job: job }
|
||||
ActiveSupport::Notifications.instrument("perform_start.active_job", payload.dup)
|
||||
|
|
|
@ -5,7 +5,7 @@ module ActiveJob
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
around_perform do |job, block, _|
|
||||
around_perform do |job, block|
|
||||
Time.use_zone(job.timezone, &block)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module ActiveJob
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
around_perform do |job, block, _|
|
||||
around_perform do |job, block|
|
||||
I18n.with_locale(job.locale, &block)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue