Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-12 17:35:59 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-17 12:50:32 +0300
commit38af7c1613e75561b405b15d6b8db1724da59ef6 (patch)
tree34de73892347f108718e3f00dea878632a75ce69 /app/models/application_setting.rb
parent619021fd7a6ac68e2821f89f746fea3a72c25e3b (diff)
Allow configuring the circuitbreaker through the API and UI
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index c0cc60d5ebf..a93b777a9bc 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -151,6 +151,13 @@ class ApplicationSetting < ActiveRecord::Base
presence: true,
numericality: { greater_than_or_equal_to: 0 }
+ validates :circuitbreaker_failure_count_threshold,
+ :circuitbreaker_failure_wait_time,
+ :circuitbreaker_failure_reset_time,
+ :circuitbreaker_storage_timeout,
+ presence: true,
+ numericality: { only_integer: true, greater_than_or_equal_to: 0 }
+
SUPPORTED_KEY_TYPES.each do |type|
validates :"#{type}_key_restriction", presence: true, key_restriction: { type: type }
end