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
717a1010
Commit
717a1010
authored
Nov 09, 2021
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix after code review
Fix `#process_sql` and invalid comment.
parent
99cc0e40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
config/initializers/database_query_analyzers.rb
config/initializers/database_query_analyzers.rb
+0
-1
spec/lib/gitlab/database/query_analyzer_spec.rb
spec/lib/gitlab/database/query_analyzer_spec.rb
+4
-2
No files found.
config/initializers/database_query_analyzers.rb
View file @
717a1010
...
...
@@ -5,7 +5,6 @@ if Gitlab.dev_or_test_env? || Gitlab::Utils.to_boolean('GITLAB_ENABLE_QUERY_ANAL
Gitlab
::
Database
::
QueryAnalyzer
.
instance
.
hook!
Gitlab
::
Application
.
configure
do
|
config
|
# ApolloUploadServer::Middleware expects to find uploaded files ready to use
config
.
middleware
.
use
(
Gitlab
::
Middleware
::
QueryAnalyzer
)
end
end
spec/lib/gitlab/database/query_analyzer_spec.rb
View file @
717a1010
...
...
@@ -126,8 +126,10 @@ RSpec.describe Gitlab::Database::QueryAnalyzer, query_analyzers: false do
end
def
process_sql
(
sql
)
ApplicationRecord
.
load_balancer
.
read_write
do
|
connection
|
described_class
.
instance
.
process_sql
(
sql
,
connection
)
described_class
.
instance
.
within
do
ApplicationRecord
.
load_balancer
.
read_write
do
|
connection
|
described_class
.
instance
.
process_sql
(
sql
,
connection
)
end
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