def connect_to_single_db_with_conf()

in postgresql_metrics/metrics_logic.py [0:0]


def connect_to_single_db_with_conf(conf, database_name):
    LOG.info("open database connection to {}:{}, user '{}', database '{}'",
             conf['postgres']['host'], conf['postgres']['port'],
             conf['postgres']['user'], database_name)
    return get_db_connection(database_name,
                             conf['postgres']['user'],
                             conf['postgres']['password'],
                             host=conf['postgres']['host'],
                             port=int(conf['postgres']['port']))