diff pkg/imports/sr.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 1ec4c5633eb6
line wrap: on
line diff
--- a/pkg/imports/sr.go	Mon Feb 11 16:49:18 2019 +0100
+++ b/pkg/imports/sr.go	Mon Feb 11 18:35:01 2019 +0100
@@ -77,13 +77,7 @@
 
 func (srJobCreator) AutoAccept() bool { return false }
 
-func (srJobCreator) Create(data string) (Job, error) {
-	sr := new(SoundingResult)
-	if err := common.FromJSONString(data, sr); err != nil {
-		return nil, err
-	}
-	return sr, nil
-}
+func (srJobCreator) Create() Job { return new(SoundingResult) }
 
 func (srJobCreator) Depends() []string {
 	return []string{