mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-23 19:46:12 +10:00
Try and use cache for application settings even when the db is not connected
This commit is contained in:
@@ -9,9 +9,9 @@ module Gitlab
|
||||
end
|
||||
|
||||
def ensure_application_settings!
|
||||
settings = nil
|
||||
settings = ::ApplicationSetting.cached
|
||||
|
||||
if connect_to_db?
|
||||
if !settings && connect_to_db?
|
||||
settings = ::ApplicationSetting.current
|
||||
settings ||= ::ApplicationSetting.create_from_defaults unless ActiveRecord::Migrator.needs_migration?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user