diff pkg/imports/st.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 97bba8b51b9c
line wrap: on
line diff
--- a/pkg/imports/st.go	Mon Feb 11 16:49:18 2019 +0100
+++ b/pkg/imports/st.go	Mon Feb 11 18:35:01 2019 +0100
@@ -19,7 +19,6 @@
 	"errors"
 	"time"
 
-	"gemma.intevation.de/gemma/pkg/common"
 	"gemma.intevation.de/gemma/pkg/models"
 )
 
@@ -46,13 +45,7 @@
 
 func (stJobCreator) AutoAccept() bool { return false }
 
-func (stJobCreator) Create(data string) (Job, error) {
-	st := new(Stretch)
-	if err := common.FromJSONString(data, st); err != nil {
-		return nil, err
-	}
-	return st, nil
-}
+func (stJobCreator) Create() Job { return new(Stretch) }
 
 func (stJobCreator) Depends() []string {
 	return []string{