Commit 717a1010 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix after code review

Fix `#process_sql` and invalid
comment.
parent 99cc0e40
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment