[PATCH] database: use postgresQueryTimeout for PostgresDB StoreMessages
Export this patch
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)
--
2.42.0
there seems to be no functional difference anyway, since we have
const postgresQueryTimeout = 5 * time.Second
const sqliteQueryTimeout = 5 * time.Second
Pushed, thanks for the fix!