Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
3a8773fb
Commit
3a8773fb
authored
Sep 01, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added USE_DB env var to allow loading fake settings without db running.
parent
aa1c3214
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
CHANGELOG
CHANGELOG
+2
-1
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+13
-1
No files found.
CHANGELOG
View file @
3a8773fb
...
...
@@ -28,6 +28,7 @@ v 8.0.0 (unreleased)
- Fixed login failure when extern_uid changes (Joel Koglin)
- Don't notify users without access to the project when they are (accidentally) mentioned in a note.
- Retrieving oauth token with LDAP credentials
- Load Application settings from running database unless env var USE_DB=false
v 7.14.1
- Improve abuse reports management from admin area
...
...
@@ -112,7 +113,7 @@ v 7.13.4
v 7.13.3
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Allow users to send abuse reports
- Remove satellites
- Remove satellites
- Link username to profile on Group Members page (Tom Webster)
v 7.13.2
...
...
lib/gitlab/current_settings.rb
View file @
3a8773fb
...
...
@@ -4,7 +4,7 @@ module Gitlab
key
=
:current_application_settings
RequestStore
.
store
[
key
]
||=
begin
if
ActiveRecord
::
Base
.
connection
.
active?
&&
ActiveRecord
::
Base
.
connection
.
table_exists?
(
'application_settings'
)
if
connect_to_db?
ApplicationSetting
.
current
||
ApplicationSetting
.
create_from_defaults
else
fake_application_settings
...
...
@@ -26,5 +26,17 @@ module Gitlab
import_sources:
Settings
.
gitlab
[
'import_sources'
]
)
end
private
def
connect_to_db?
use_db
=
if
ENV
[
'USE_DB'
]
==
"false"
false
else
true
end
use_db
&&
ActiveRecord
::
Base
.
connection
.
active?
&&
ActiveRecord
::
Base
.
connection
.
table_exists?
(
'application_settings'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment