Skip to content
Snippets Groups Projects
Commit 03f1abfc authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Only ensure against yield so that pool should be available

parent 136dc794
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -72,11 +72,12 @@ module Gitlab
def self.with_connection_pool(pool_size)
pool = create_connection_pool(pool_size)
 
begin
yield(pool)
ensure
pool.disconnect!
end
end
 
def self.create_connection_pool(pool_size)
# See activerecord-4.2.7.1/lib/active_record/connection_adapters/connection_specification.rb
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment