feat(storage,sqlite): begin tx with context
arcad/edge/pipeline/head This commit looks good
Details
arcad/edge/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4db7576b12
commit
310dac296f
|
@ -25,7 +25,7 @@ func Open(path string) (*sql.DB, error) {
|
||||||
func withTx(ctx context.Context, db *sql.DB, fn func(tx *sql.Tx) error) error {
|
func withTx(ctx context.Context, db *sql.DB, fn func(tx *sql.Tx) error) error {
|
||||||
var tx *sql.Tx
|
var tx *sql.Tx
|
||||||
|
|
||||||
tx, err := db.Begin()
|
tx, err := db.BeginTx(ctx, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithStack(err)
|
return errors.WithStack(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue