diff --git a/backend/pkg/db/cache/pg-cache.go b/backend/pkg/db/cache/pg-cache.go index ca31bcd82..bb87f9f4c 100644 --- a/backend/pkg/db/cache/pg-cache.go +++ b/backend/pkg/db/cache/pg-cache.go @@ -13,11 +13,6 @@ type ProjectMeta struct { expirationTime time.Time } -// !TODO: remove old sessions by timeout to avoid memleaks - -/* - * Cache layer around the stateless PG adapter -**/ type PGCache struct { *postgres.Conn sessions map[uint64]*Session @@ -26,7 +21,6 @@ type PGCache struct { projectExpirationTimeout time.Duration } -// TODO: create conn automatically func NewPGCache(pgConn *postgres.Conn, projectExpirationTimeoutMs int64) *PGCache { return &PGCache{ Conn: pgConn, diff --git a/backend/pkg/db/postgres/connector.go b/backend/pkg/db/postgres/connector.go index 63f42e25b..9e269fcc0 100644 --- a/backend/pkg/db/postgres/connector.go +++ b/backend/pkg/db/postgres/connector.go @@ -55,8 +55,7 @@ func NewConn(url string, queueLimit, sizeLimit int, metrics *monitoring.Metrics) } c, err := pgxpool.Connect(context.Background(), url) if err != nil { - log.Println(err) - log.Fatalln("pgxpool.Connect Error") + log.Fatalf("pgxpool.Connect err: %s", err) } conn := &Conn{ batches: make(map[uint64]*pgx.Batch),