From 5ae86d69cc1a76f7b9f85af70caaa6834d1673f2 Mon Sep 17 00:00:00 2001 From: sentriz Date: Mon, 6 Nov 2023 14:13:48 +0000 Subject: [PATCH] database: use postgresQueryTimeout for PostgresDB StoreMessages using the sqliteQueryTimeout means a `undefined: sqliteQueryTimeout` when building with `-tags=nosqlite` --- database/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/postgres.go b/database/postgres.go index 68672a6..ca6bf51 100644 --- a/database/postgres.go +++ b/database/postgres.go @@ -933,7 +933,7 @@ func (db *PostgresDB) StoreMessages(ctx context.Context, networkID int64, name s return nil, nil } - ctx, cancel := context.WithTimeout(ctx, time.Duration(len(msgs))*sqliteQueryTimeout) + ctx, cancel := context.WithTimeout(ctx, time.Duration(len(msgs))*postgresQueryTimeout) defer cancel() tx, err := db.db.BeginTx(ctx, nil)