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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3117a357
Commit
3117a357
authored
Mar 30, 2021
by
Leandro Gomes
Committed by
Andreas Brandl
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use empty-query by default to check database connection
parent
7c348b99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
changelogs/unreleased/activerecord_empty_query_default_true.yml
...logs/unreleased/activerecord_empty_query_default_true.yml
+5
-0
config/initializers/active_record_ping.rb
config/initializers/active_record_ping.rb
+1
-1
No files found.
changelogs/unreleased/activerecord_empty_query_default_true.yml
0 → 100644
View file @
3117a357
---
title
:
Use empty-query by default to check database connection
merge_request
:
54366
author
:
Leandro Gomes @leandrogs
type
:
performance
config/initializers/active_record_ping.rb
View file @
3117a357
...
...
@@ -2,6 +2,6 @@
# # frozen_string_literal: true
if
Gitlab
::
Utils
.
to_boolean
(
ENV
[
'ENABLE_ACTIVERECORD_EMPTY_PING'
],
default:
fals
e
)
if
Gitlab
::
Utils
.
to_boolean
(
ENV
[
'ENABLE_ACTIVERECORD_EMPTY_PING'
],
default:
tru
e
)
ActiveRecord
::
ConnectionAdapters
::
PostgreSQLAdapter
.
prepend
(
Gitlab
::
Database
::
PostgresqlAdapter
::
EmptyQueryPing
)
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