summaryrefslogtreecommitdiff
path: root/app/models/application_setting.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-12 16:35:59 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-16 15:00:47 +0200
commit8823125eab3b9698c7fabecff5479b96aaea360c (patch)
tree3afa3e3668e818dca29ccbf6ed49f3c1e1dc6f2d /app/models/application_setting.rb
parentd4bd322dc74dc6802416404c90b42abef5eb7acc (diff)
downloadgitlab-ce-bvl-circuitbreaker-improvements.tar.gz
Allow configuring the circuitbreaker through the API and UIbvl-circuitbreaker-improvements
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