lib/legion/data/connection.rb in legion-data-1.1.5 vs lib/legion/data/connection.rb in legion-data-1.2.0
- old
+ new
@@ -31,15 +31,15 @@
def creds_builder(final_creds = {})
final_creds.merge! Legion::Data::Settings.creds
final_creds.merge! Legion::Settings[:data][:creds] if Legion::Settings[:data][:creds].is_a? Hash
- if Legion::Settings[:data][:connection][:max_connections].is_a? Integer
- final_creds[:max_connections] = Legion::Settings[:data][:connection][:max_connections]
- end
+ # if Legion::Settings[:data][:connection][:max_connections].is_a? Integer
+ # final_creds[:max_connections] = Legion::Settings[:data][:connection][:max_connections]
+ # end
- final_creds[:preconnect] = :concurrently if Legion::Settings[:data][:connection][:preconnect]
+ # final_creds[:preconnect] = :concurrently if Legion::Settings[:data][:connection][:preconnect]
return final_creds if Legion::Settings[:vault].nil?
if Legion::Settings[:vault][:connected] && ::Vault.sys.mounts.key?(:database)
temp_vault_creds = Legion::Crypt.read('database/creds/legion')
@@ -50,14 +50,14 @@
final_creds
end
def default_creds
{
- host: '127.0.0.1',
- port: 3306,
- username: 'legion',
- password: 'legion',
- database: 'legion',
+ host: '127.0.0.1',
+ port: 3306,
+ username: 'legion',
+ password: 'legion',
+ database: 'legion',
max_connections: 4
}
end
end
end