File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,18 @@ def increase_db_pool_size(world = nil)
126126 end
127127 if increase_db_pool_size?
128128 db_pool_size = calculate_db_pool_size ( world )
129- ::ActiveRecord ::Base . connection_pool . disconnect!
130129
131130 base_config = ::ActiveRecord ::Base . configurations . configs_for ( env_name : ::Rails . env ) [ 0 ]
132131 config = if base_config . respond_to? ( :configuration_hash )
133132 ::Dynflow ::Utils ::IndifferentHash . new ( base_config . configuration_hash . dup )
134133 else
135134 base_config . config . dup
136135 end
137- config [ 'pool' ] = db_pool_size if config [ 'pool' ] . to_i < db_pool_size
136+
137+ return unless config [ 'pool' ] . to_i < db_pool_size
138+
139+ config [ 'pool' ] = db_pool_size
140+ ::ActiveRecord ::Base . connection_pool . disconnect!
138141 ::ActiveRecord ::Base . establish_connection ( config )
139142 end
140143 end
You can’t perform that action at this time.
0 commit comments