Commit e5228347 authored by Stan Hu's avatar Stan Hu

Merge branch '33749-uninitialized-constant-ee-gitlab-throttle-when-using-spring' into 'master'

uninitialized constant EE::Gitlab::Throttle during code reload

Closes #33749

See merge request gitlab-org/gitlab!18396
parents 45970b95 36f07e74
# frozen_string_literal: true
module EE::Gitlab::Throttle
def self.settings
Gitlab::Throttle.settings
end
def self.incident_management_options
limit_proc = proc { |req| settings.throttle_incident_management_notification_per_period }
period_proc = proc { |req| settings.throttle_incident_management_notification_period_in_seconds.seconds }
{ limit: limit_proc, period: period_proc }
end
end
module EE::Gitlab::Rack::Attack
Rack::Attack.throttle('throttle_incident_management_notification_web', EE::Gitlab::Throttle.incident_management_options) do |req|
EE::Gitlab::Throttle.settings.throttle_incident_management_notification_enabled &&
......
# frozen_string_literal: true
module EE::Gitlab::Throttle
def self.settings
Gitlab::Throttle.settings
end
def self.incident_management_options
limit_proc = proc { |req| settings.throttle_incident_management_notification_per_period }
period_proc = proc { |req| settings.throttle_incident_management_notification_period_in_seconds.seconds }
{ limit: limit_proc, period: period_proc }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment