Skip to content

Commit

Permalink
Fix warnings on Rails boot (mastodon#16946)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and jesseplusplus committed Feb 10, 2022
1 parent 468ceb1 commit 9981be6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
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')
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require_relative '../../lib/sidekiq_error_handler'

Sidekiq.configure_server do |config|
config.redis = REDIS_SIDEKIQ_PARAMS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ def call(*)

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

0 comments on commit 9981be6

Please sign in to comment.