comparison 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
comparison
equal deleted inserted replaced
1135:19a04b150b6c 1136:a5069da2f0b7
59 contourTolerance = 0.1 59 contourTolerance = 0.1
60 ) 60 )
61 61
62 const SRJobKind JobKind = "sr" 62 const SRJobKind JobKind = "sr"
63 63
64 type srJobCreator struct{}
65
66 func (srJobCreator) Create(_ JobKind, data string) (Job, error) {
67 return SoundingResult(data), nil
68 }
69
70 func (srJobCreator) Depends() []string {
71 return []string{
72 "waterway.sounding_results",
73 "waterway.sounding_results_contour_lines",
74 "waterway.bottlenecks",
75 }
76 }
77
64 func init() { 78 func init() {
65 RegisterJobCreator(SRJobKind, func(_ JobKind, data string) (Job, error) { 79 RegisterJobCreator(SRJobKind, srJobCreator{})
66 return SoundingResult(data), nil
67 })
68 } 80 }
69 81
70 const ( 82 const (
71 checkDepthReferenceSQL = ` 83 checkDepthReferenceSQL = `
72 SELECT true FROM depth_references WHERE depth_reference = $1` 84 SELECT true FROM depth_references WHERE depth_reference = $1`