mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
Fix warnings on Rails boot (#16946)
This commit is contained in:
parent
e65080181a
commit
fe71548844
|
@ -81,7 +81,7 @@ Rails.application.configure do
|
||||||
Bullet.bullet_logger = true
|
Bullet.bullet_logger = true
|
||||||
Bullet.rails_logger = false
|
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
|
end
|
||||||
|
|
||||||
config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')
|
config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require_relative '../../lib/sidekiq_error_handler'
|
||||||
|
|
||||||
Sidekiq.configure_server do |config|
|
Sidekiq.configure_server do |config|
|
||||||
config.redis = REDIS_SIDEKIQ_PARAMS
|
config.redis = REDIS_SIDEKIQ_PARAMS
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,8 @@ class SidekiqErrorHandler
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# rubocop:disable Naming/MethodParameterName
|
def limit_backtrace_and_raise(exception)
|
||||||
def limit_backtrace_and_raise(e)
|
exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT))
|
||||||
e.set_backtrace(e.backtrace.first(BACKTRACE_LIMIT))
|
raise exception
|
||||||
raise e
|
|
||||||
end
|
end
|
||||||
# rubocop:enable Naming/MethodParameterName
|
|
||||||
end
|
end
|
Loading…
Reference in a new issue