コード例 #1
0
ファイル: postgresql.py プロジェクト: disqus/pgshovel
def get_connection(cluster, dsn):
    _, connection = get_managed_databases(cluster, (dsn,)).items()[0]
    return connection
コード例 #2
0
ファイル: postgres.py プロジェクト: disqus/pgshovel
def target_connection(target_cluster):
    dsn = create_temporary_database('target')
    _, connection = get_managed_databases(target_cluster, (dsn,)).items()[0]
    yield connection