Mercurial > gemma
diff pkg/imports/sr.go @ 1136:a5069da2f0b7
Independent imports in terms of affected tables/dependencies are now run concurrently.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 08 Nov 2018 15:50:28 +0100 |
parents | 2e6b47cdb2ca |
children | 2fb6c0a6ec8a |
line wrap: on
line diff
--- a/pkg/imports/sr.go Wed Nov 07 23:03:59 2018 +0100 +++ b/pkg/imports/sr.go Thu Nov 08 15:50:28 2018 +0100 @@ -61,10 +61,22 @@ const SRJobKind JobKind = "sr" +type srJobCreator struct{} + +func (srJobCreator) Create(_ JobKind, data string) (Job, error) { + return SoundingResult(data), nil +} + +func (srJobCreator) Depends() []string { + return []string{ + "waterway.sounding_results", + "waterway.sounding_results_contour_lines", + "waterway.bottlenecks", + } +} + func init() { - RegisterJobCreator(SRJobKind, func(_ JobKind, data string) (Job, error) { - return SoundingResult(data), nil - }) + RegisterJobCreator(SRJobKind, srJobCreator{}) } const (