lib/foreman_tasks/dynflow/configuration.rb in foreman-tasks-0.8.3 vs lib/foreman_tasks/dynflow/configuration.rb in foreman-tasks-0.8.4
- old
+ new
@@ -92,12 +92,10 @@
config['pool'] = db_pool_size if config['pool'].to_i < db_pool_size
ActiveRecord::Base.establish_connection(config)
end
end
- protected
-
# generates the options hash consumable by the Dynflow's world
def world_config
::Dynflow::Config.new.tap do |config|
config.auto_rescue = true
config.logger_adapter = ::Dynflow::LoggerAdapters::Delegator.new(action_logger, dynflow_logger)
@@ -109,9 +107,11 @@
# we can't do any operation until the ForemanTasks.dynflow.world is set
config.auto_execute = false
end
end
+
+ protected
def default_sequel_adapter_options
db_config = ActiveRecord::Base.configurations[Rails.env].dup
db_config['adapter'] = 'postgres' if db_config['adapter'] == 'postgresql'
db_config['max_connections'] = db_pool_size if increase_db_pool_size?