From bb3c3b1ac8366ab27233576fb696fd6c82360153 Mon Sep 17 00:00:00 2001 From: Zhongyang Xia Date: Thu, 24 Jun 2021 19:35:10 -0400 Subject: [PATCH] Implement CloseSession --- etc/eventmaster.json | 9 ++++++++- postgres.go | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/eventmaster.json b/etc/eventmaster.json index 7aeed99..b4680bf 100644 --- a/etc/eventmaster.json +++ b/etc/eventmaster.json @@ -1,5 +1,12 @@ { - "data_store": "cassandra", + "data_store": "postgres", + "postgres_config": { + "addr": "127.0.0.1", + "port": 5432, + "database": "eventmaster", + "username": "postgres", + "password": "password" + }, "cassandra_config": { "addrs": ["127.0.0.1:9042"], "keyspace": "event_master", diff --git a/postgres.go b/postgres.go index 62c9a48..99d64b8 100644 --- a/postgres.go +++ b/postgres.go @@ -131,6 +131,5 @@ func (p *PostgresStore) UpdateDC(string, string) error { } func (p *PostgresStore) CloseSession() { - // TODO: implement this function - return + p.db.Close() }