FIX: If site settings are missing don't do anything
This commit is contained in:
parent
da2f1fda15
commit
b270e0142b
|
@ -64,7 +64,7 @@ store.redis_raw_connection = redis.without_namespace
|
|||
severities = [Logger::WARN, Logger::ERROR, Logger::FATAL, Logger::UNKNOWN]
|
||||
|
||||
RailsMultisite::ConnectionManagement.each_connection do
|
||||
error_rate_per_minute = SiteSetting.alert_admins_if_errors_per_minute
|
||||
error_rate_per_minute = SiteSetting.alert_admins_if_errors_per_minute rescue 0
|
||||
|
||||
if error_rate_per_minute > 0
|
||||
store.register_rate_limit_per_minute(severities, error_rate_per_minute) do |rate|
|
||||
|
@ -72,7 +72,7 @@ RailsMultisite::ConnectionManagement.each_connection do
|
|||
end
|
||||
end
|
||||
|
||||
error_rate_per_hour = SiteSetting.alert_admins_if_errors_per_hour
|
||||
error_rate_per_hour = SiteSetting.alert_admins_if_errors_per_hour rescue 0
|
||||
|
||||
if error_rate_per_hour > 0
|
||||
store.register_rate_limit_per_hour(severities, error_rate_per_hour) do |rate|
|
||||
|
|
Loading…
Reference in New Issue