aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-02-23 00:58:00 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-02-23 00:58:00 +0200
commit6a1e7292bc3dbf9963c9aa8de75662ce1496a7c7 (patch)
treecbb23ae47afb78bfb5415dceaa1d9d34ec1a3e8b /activejob
parentf85c77bef9efd8ffa97a59e87320e55e486e30c2 (diff)
downloadrails-6a1e7292bc3dbf9963c9aa8de75662ce1496a7c7.tar.gz
rails-6a1e7292bc3dbf9963c9aa8de75662ce1496a7c7.tar.bz2
rails-6a1e7292bc3dbf9963c9aa8de75662ce1496a7c7.zip
Remove passing extra arguments to ActiveJob Callbacks
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/logging.rb4
-rw-r--r--activejob/lib/active_job/timezones.rb2
-rw-r--r--activejob/lib/active_job/translation.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/activejob/lib/active_job/logging.rb b/activejob/lib/active_job/logging.rb
index 96c48d04a7..3312857ac7 100644
--- a/activejob/lib/active_job/logging.rb
+++ b/activejob/lib/active_job/logging.rb
@@ -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)
diff --git a/activejob/lib/active_job/timezones.rb b/activejob/lib/active_job/timezones.rb
index 83f459aea5..ac018eb752 100644
--- a/activejob/lib/active_job/timezones.rb
+++ b/activejob/lib/active_job/timezones.rb
@@ -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
diff --git a/activejob/lib/active_job/translation.rb b/activejob/lib/active_job/translation.rb
index fb45c80d67..0fd9b9fc06 100644
--- a/activejob/lib/active_job/translation.rb
+++ b/activejob/lib/active_job/translation.rb
@@ -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