FIX: Assigning wrong value to variable.
This commit is contained in:
parent
779f749642
commit
5dc5767851
|
@ -64,13 +64,17 @@ store.redis_raw_connection = redis.without_namespace
|
||||||
severities = [Logger::WARN, Logger::ERROR, Logger::FATAL, Logger::UNKNOWN]
|
severities = [Logger::WARN, Logger::ERROR, Logger::FATAL, Logger::UNKNOWN]
|
||||||
|
|
||||||
RailsMultisite::ConnectionManagement.each_connection do
|
RailsMultisite::ConnectionManagement.each_connection do
|
||||||
if error_rate_per_minute = SiteSetting.alert_admins_if_errors_per_minute > 0
|
error_rate_per_minute = SiteSetting.alert_admins_if_errors_per_minute
|
||||||
|
|
||||||
|
if error_rate_per_minute > 0
|
||||||
store.register_rate_limit_per_minute(severities, error_rate_per_minute) do |rate|
|
store.register_rate_limit_per_minute(severities, error_rate_per_minute) do |rate|
|
||||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute' })
|
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'minute' })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if error_rate_per_hour = SiteSetting.alert_admins_if_errors_per_hour > 0
|
error_rate_per_hour = SiteSetting.alert_admins_if_errors_per_hour
|
||||||
|
|
||||||
|
if error_rate_per_hour > 0
|
||||||
store.register_rate_limit_per_hour(severities, error_rate_per_hour) do |rate|
|
store.register_rate_limit_per_hour(severities, error_rate_per_hour) do |rate|
|
||||||
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour' })
|
MessageBus.publish("/logs_error_rate_exceeded", { rate: rate, duration: 'hour' })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue