changeset 1678:8fdb57173e3f

Waterway axis import: Made schedulable, too. TODO: Remove hard-coded parameters.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 26 Dec 2018 10:54:52 +0100
parents 53304db85888
children 2dc7768be0e4
files pkg/imports/scheduled.go
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/imports/scheduled.go	Wed Dec 26 10:46:17 2018 +0100
+++ b/pkg/imports/scheduled.go	Wed Dec 26 10:54:52 2018 +0100
@@ -42,6 +42,19 @@
 			Insecure: false,
 		}
 	})
+	registerAction(WXJobKind, func(cfg *IDConfig) interface{} {
+		log.Println("info: schedule 'wx' import")
+		// TODO: Take this from configuration.
+		var (
+			featureType = "ws-wamos:ienc_wtwaxs"
+			sortBy      = "hydro_scamin"
+		)
+		return &WaterwayAxis{
+			URL:         *cfg.URL,
+			FeatureType: featureType,
+			SortBy:      sortBy,
+		}
+	})
 }
 
 func registerAction(kind JobKind, setup func(cfg *IDConfig) interface{}) {