Mercurial > gemma
diff pkg/imports/wfsjob.go @ 5034:59a99655f34d
Added feedback support for StageDone.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 20 Mar 2020 12:28:04 +0100 |
parents | ae3a1392f9d0 |
children | c9bca9a9666c |
line wrap: on
line diff
--- a/pkg/imports/wfsjob.go Fri Mar 20 10:54:41 2020 +0100 +++ b/pkg/imports/wfsjob.go Fri Mar 20 12:28:04 2020 +0100 @@ -49,7 +49,7 @@ newConsumer func(context.Context, *sql.Conn, Feedback) (WFSFeatureConsumer, error) - stageDone func(context.Context, *sql.Tx, int64) error + stageDone func(context.Context, *sql.Tx, int64, Feedback) error } WFSFeatureJob struct { @@ -86,11 +86,16 @@ return wfjc.stageDone == nil } -func (wfjc *WFSFeatureJobCreator) StageDone(ctx context.Context, tx *sql.Tx, id int64) error { +func (wfjc *WFSFeatureJobCreator) StageDone( + ctx context.Context, + tx *sql.Tx, + id int64, + feedback Feedback, +) error { if wfjc.stageDone == nil { return nil } - return wfjc.stageDone(ctx, tx, id) + return wfjc.stageDone(ctx, tx, id, feedback) } func (wfjc *WFSFeatureJobCreator) Create() Job {