Remove references to do_metadata_database (no longer in use)

pull/16212/head
Rafa de la Torre 4 years ago
parent b1c998d921
commit dd65037fe8

@ -823,12 +823,6 @@ development:
critical: false # either the failure is considered an error or a warning
timeout: 1 # socket timeout
trigger_verbose: false
do_metadata_database:
host: 'localhost'
port: 5432
database: 'catalog'
username: ''
password: ''
test:
<<: *defaults
@ -864,12 +858,6 @@ test:
critical: false # either the failure is considered an error or a warning
timeout: 1 # socket timeout
trigger_verbose: false
do_metadata_database:
host: 'localhost'
port: 5432
database: 'carto_db_test'
username: 'postgres'
password: ''
staging:
<<: *defaults

@ -819,12 +819,6 @@ development:
critical: false # either the failure is considered an error or a warning
timeout: 1 # socket timeout
trigger_verbose: false
do_metadata_database:
host: 'localhost'
port: 5432
database: 'catalog'
username: ''
password: ''
test:
<<: *defaults
@ -860,12 +854,6 @@ test:
critical: false # either the failure is considered an error or a warning
timeout: 1 # socket timeout
trigger_verbose: false
do_metadata_database:
host: 'localhost'
port: 5432
database: 'carto_db_test'
username: 'postgres'
password: ''
staging:
<<: *defaults

@ -43,16 +43,6 @@ module Carto
end
end
def do_metadata_connection()
configuration = get_metadata_db_configuration()
$pool.fetch(configuration) do
get_database_without_search_path(configuration)
end
rescue StandardError => exception
CartoDB::report_exception(exception, "Cannot connect to DO Metadata database")
raise exception
end
private
def get_database(options, configuration)
@ -150,18 +140,6 @@ module Carto
end
end
def get_metadata_db_configuration()
do_configuration = Cartodb.config[:do_metadata_database]
configuration = get_db_configuration_for(do_configuration['host'], do_configuration['database'], {})
configuration.merge(do_configuration)
end
def get_database_without_search_path(configuration)
resolver = ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new([])
ActiveRecord::Base.connection_handler.establish_connection(
get_connection_name(:do_metadata_connection), resolver.spec(configuration)
).connection
end
end
end
end

@ -28,11 +28,4 @@ module DatabaseConnectionHelper
)
with_connection options, &block
end
def with_do_connection(&block)
do_configuration = Cartodb.config[:do_metadata_database].merge(
'adapter' => 'postgresql'
)
with_connection do_configuration, &block
end
end

Loading…
Cancel
Save