diff pkg/controllers/manualimports.go @ 1901:71b722809b2b

Stretch import: Added stub.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Jan 2019 15:52:51 +0100
parents 427f86518097
children 8eeb0b5eb340
line wrap: on
line diff
--- a/pkg/controllers/manualimports.go	Fri Jan 18 15:04:53 2019 +0100
+++ b/pkg/controllers/manualimports.go	Fri Jan 18 15:52:51 2019 +0100
@@ -144,6 +144,22 @@
 	return dma, due, retries, dmai.SendEmail
 }
 
+func importStretch(input interface{}) (interface{}, time.Time, int, bool) {
+	sti := input.(*models.StretchImport)
+	st := &imports.Stretch{
+		Name:      sti.Name,
+		From:      sti.From,
+		To:        sti.To,
+		ObjNam:    sti.ObjNam,
+		NObjNam:   sti.NObjNam,
+		Source:    sti.Source,
+		Date:      sti.Date,
+		Countries: sti.Countries,
+	}
+	due, retries := retry(sti.Attributes)
+	return st, due, retries, sti.SendEmail
+}
+
 func manualImport(
 	kind imports.JobKind,
 	setup func(interface{}) (interface{}, time.Time, int, bool),