diff pkg/imports/wa.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 02505fcff63c
line wrap: on
line diff
--- a/pkg/imports/wa.go	Mon Feb 11 16:49:18 2019 +0100
+++ b/pkg/imports/wa.go	Mon Feb 11 18:35:01 2019 +0100
@@ -23,7 +23,6 @@
 	"strconv"
 	"time"
 
-	"gemma.intevation.de/gemma/pkg/common"
 	"gemma.intevation.de/gemma/pkg/wfs"
 )
 
@@ -53,13 +52,7 @@
 
 func (waJobCreator) AutoAccept() bool { return true }
 
-func (waJobCreator) Create(data string) (Job, error) {
-	wa := new(WaterwayArea)
-	if err := common.FromJSONString(data, wa); err != nil {
-		return nil, err
-	}
-	return wa, nil
-}
+func (waJobCreator) Create() Job { return new(WaterwayArea) }
 
 func (waJobCreator) Depends() []string {
 	return []string{