Skip to content
Snippets Groups Projects
Commit de61dc4c authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch 'revert-b923d1b5' into 'master'

Revert "Merge branch 'check_pg_stat_activity' into 'master'"

See merge request gitlab-org/gitlab-ce!26016
parents 6fd7149e de54e4f9
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
RSpec.configure do |config|
config.before do
if Gitlab::Database.postgresql? && ENV['PG_STAT_WARNING_THRESHOLD']
warning_threshold = ENV['PG_STAT_WARNING_THRESHOLD'].to_i
results = ActiveRecord::Base.connection.execute('SELECT * FROM pg_stat_activity')
ntuples = results.ntuples
warn("pg_stat_activity count: #{ntuples}")
if ntuples > warning_threshold
results.each do |result|
warn result.inspect
end
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment