diff pkg/imports/wg.go @ 1975:d966f03ea819

Imports: Added the new state 'unchanged' which can be issued by the imports to indicate that the database is not modified by the particular imports.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 23 Jan 2019 11:20:14 +0100
parents 62b5f6e48e82
children b868cb653c4d
line wrap: on
line diff
--- a/pkg/imports/wg.go	Wed Jan 23 11:07:17 2019 +0100
+++ b/pkg/imports/wg.go	Wed Jan 23 11:20:14 2019 +0100
@@ -18,7 +18,6 @@
 	"database/sql"
 	"errors"
 	"fmt"
-	"log"
 	"strings"
 	"time"
 
@@ -181,7 +180,6 @@
 	data, err := client.GetRisDataXML(request)
 
 	if err != nil {
-		log.Printf("error: %v\n", err)
 		return nil, fmt.Errorf("Error requesting ERDMS service: %v", err)
 	}
 
@@ -254,7 +252,7 @@
 	feedback.Info("update gauges: %d", len(olds))
 
 	if len(news) == 0 && len(olds) == 0 {
-		return nil, errors.New("nothing to do")
+		return nil, UnchangedError("nothing to do")
 	}
 
 	// delete reference water leves of the old.