Mercurial > gemma
diff pkg/imports/wa.go @ 2661:542d3441c2d8
Bring context.Context parameters to front.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 14 Mar 2019 18:31:59 +0100 |
parents | 00b0a7b2225a |
children | 2b6f73c30016 |
line wrap: on
line diff
--- a/pkg/imports/wa.go Thu Mar 14 18:26:00 2019 +0100 +++ b/pkg/imports/wa.go Thu Mar 14 18:31:59 2019 +0100 @@ -231,7 +231,7 @@ if err := json.Unmarshal(*feature.Geometry.Coordinates, &p); err != nil { return err } - if err := Savepoint(tx, ctx, featureSavepoint); err != nil { + if err := Savepoint(ctx, tx, featureSavepoint); err != nil { return err } if _, err := insertStmt.ExecContext( @@ -242,11 +242,11 @@ dirimp, ); err != nil { feedback.Warn(handleError(err).Error()) - if err = RollbackToSavepoint(tx, ctx, featureSavepoint); err != nil { + if err = RollbackToSavepoint(ctx, tx, featureSavepoint); err != nil { return err } } else { - if err = ReleaseSavepoint(tx, ctx, featureSavepoint); err != nil { + if err = ReleaseSavepoint(ctx, tx, featureSavepoint); err != nil { return err } features++