summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-11-07 12:13:02 +0000
committerDouwe Maan <douwe@gitlab.com>2016-11-07 12:13:02 +0000
commit76ff9fffcce353e33f407b78cf4256ef4dc50f6a (patch)
treee82f861d3e17dbcf6f280f06239c759f674f6697 /app/models
parentbad6d29f33eec97ef4909a6247024c61776e5279 (diff)
parentc5eca4a632d3be058a0094d269fb0aac88e130d5 (diff)
downloadgitlab-ce-76ff9fffcce353e33f407b78cf4256ef4dc50f6a.tar.gz
Merge branch 'jacobvosmaer-gitlab/gitlab-ce-git-gc-improvements' into 'master'
Use more than one kind of Git garbage collection Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6588 by @jacobvosmaer to get the builds to pass :) Closes #22729 See merge request !7321
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 9b02a68a202..bb60cc8736c 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -85,6 +85,18 @@ class ApplicationSetting < ActiveRecord::Base
presence: { message: 'Domain blacklist cannot be empty if Blacklist is enabled.' },
if: :domain_blacklist_enabled?
+ validates :housekeeping_incremental_repack_period,
+ presence: true,
+ numericality: { only_integer: true, greater_than: 0 }
+
+ validates :housekeeping_full_repack_period,
+ presence: true,
+ numericality: { only_integer: true, greater_than: :housekeeping_incremental_repack_period }
+
+ validates :housekeeping_gc_period,
+ presence: true,
+ numericality: { only_integer: true, greater_than: :housekeeping_full_repack_period }
+
validates_each :restricted_visibility_levels do |record, attr, value|
unless value.nil?
value.each do |level|
@@ -168,6 +180,11 @@ class ApplicationSetting < ActiveRecord::Base
container_registry_token_expire_delay: 5,
repository_storages: ['default'],
user_default_external: false,
+ housekeeping_enabled: true,
+ housekeeping_bitmaps_enabled: true,
+ housekeeping_incremental_repack_period: 10,
+ housekeeping_full_repack_period: 50,
+ housekeeping_gc_period: 200,
)
end