about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/initializers/sidekiq.rb2
-rw-r--r--lib/sidekiq_error_handler.rb (renamed from app/lib/sidekiq_error_handler.rb)8
3 files changed, 6 insertions, 6 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index d76361c60..de8762ff7 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -81,7 +81,7 @@ Rails.application.configure do
     Bullet.bullet_logger = true
     Bullet.rails_logger  = false
 
-    Bullet.add_whitelist type: :n_plus_one_query, class_name: 'User', association: :account
+    Bullet.add_safelist type: :n_plus_one_query, class_name: 'User', association: :account
   end
 
   config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 219554df4..19a705ce8 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,5 +1,7 @@
 # frozen_string_literal: true
 
+require_relative '../../lib/sidekiq_error_handler'
+
 Sidekiq.configure_server do |config|
   config.redis = REDIS_SIDEKIQ_PARAMS
 
diff --git a/app/lib/sidekiq_error_handler.rb b/lib/sidekiq_error_handler.rb
index ab555b1be..358afd540 100644
--- a/app/lib/sidekiq_error_handler.rb
+++ b/lib/sidekiq_error_handler.rb
@@ -17,10 +17,8 @@ class SidekiqErrorHandler
 
   private
 
-  # rubocop:disable Naming/MethodParameterName
-  def limit_backtrace_and_raise(e)
-    e.set_backtrace(e.backtrace.first(BACKTRACE_LIMIT))
-    raise e
+  def limit_backtrace_and_raise(exception)
+    exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT))
+    raise exception
   end
-  # rubocop:enable Naming/MethodParameterName
 end