Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
1900:6a67cd819e93 | 1901:71b722809b2b |
---|---|
142 } | 142 } |
143 due, retries := retry(dmai.Attributes) | 143 due, retries := retry(dmai.Attributes) |
144 return dma, due, retries, dmai.SendEmail | 144 return dma, due, retries, dmai.SendEmail |
145 } | 145 } |
146 | 146 |
147 func importStretch(input interface{}) (interface{}, time.Time, int, bool) { | |
148 sti := input.(*models.StretchImport) | |
149 st := &imports.Stretch{ | |
150 Name: sti.Name, | |
151 From: sti.From, | |
152 To: sti.To, | |
153 ObjNam: sti.ObjNam, | |
154 NObjNam: sti.NObjNam, | |
155 Source: sti.Source, | |
156 Date: sti.Date, | |
157 Countries: sti.Countries, | |
158 } | |
159 due, retries := retry(sti.Attributes) | |
160 return st, due, retries, sti.SendEmail | |
161 } | |
162 | |
147 func manualImport( | 163 func manualImport( |
148 kind imports.JobKind, | 164 kind imports.JobKind, |
149 setup func(interface{}) (interface{}, time.Time, int, bool), | 165 setup func(interface{}) (interface{}, time.Time, int, bool), |
150 ) func(interface{}, *http.Request, *sql.Conn) (JSONResult, error) { | 166 ) func(interface{}, *http.Request, *sql.Conn) (JSONResult, error) { |
151 | 167 |