diff pkg/imports/bn.go @ 2187:7c83b5277c1c

Import queue: Removed boilerplate code to deserialize jobs from JSON by making it part of the import queue.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 Feb 2019 18:35:01 +0100
parents b868cb653c4d
children 3437ceee1529
line wrap: on
line diff
--- a/pkg/imports/bn.go	Mon Feb 11 16:49:18 2019 +0100
+++ b/pkg/imports/bn.go	Mon Feb 11 18:35:01 2019 +0100
@@ -21,7 +21,6 @@
 	"strconv"
 	"time"
 
-	"gemma.intevation.de/gemma/pkg/common"
 	"gemma.intevation.de/gemma/pkg/soap/ifbn"
 )
 
@@ -88,13 +87,7 @@
 
 func (bnJobCreator) AutoAccept() bool { return false }
 
-func (bnJobCreator) Create(data string) (Job, error) {
-	bn := new(Bottleneck)
-	if err := common.FromJSONString(data, bn); err != nil {
-		return nil, err
-	}
-	return bn, nil
-}
+func (bnJobCreator) Create() Job { return new(Bottleneck) }
 
 func (bnJobCreator) Depends() []string {
 	return []string{