comparison pkg/imports/agm.go @ 4171:5a650cde0574

Move warning limiter to common package to flesh up the misc package. The remaining stuff in misc has dependencies to the config and cannot be removed from there easily w/o introducing cyclic imports. I have to rethink this.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 05 Aug 2019 16:43:31 +0200
parents afabd52212d2
children 8b75ac5e243e
comparison
equal deleted inserted replaced
4170:afabd52212d2 4171:5a650cde0574
30 "strconv" 30 "strconv"
31 "strings" 31 "strings"
32 "time" 32 "time"
33 33
34 "gemma.intevation.de/gemma/pkg/common" 34 "gemma.intevation.de/gemma/pkg/common"
35 "gemma.intevation.de/gemma/pkg/misc"
36 "gemma.intevation.de/gemma/pkg/models" 35 "gemma.intevation.de/gemma/pkg/models"
37 ) 36 )
38 37
39 type ApprovedGaugeMeasurements struct { 38 type ApprovedGaugeMeasurements struct {
40 Dir string `json:"dir"` 39 Dir string `json:"dir"`
306 305
307 entries := []*agmSummaryEntry{} 306 entries := []*agmSummaryEntry{}
308 307
309 checkedGauges := map[models.Isrs]bool{} 308 checkedGauges := map[models.Isrs]bool{}
310 309
311 warnLimiter := misc.WarningLimiter{Log: feedback.Warn, MaxWarnings: 100} 310 warnLimiter := common.WarningLimiter{Log: feedback.Warn, MaxWarnings: 100}
312 warn := warnLimiter.Warn 311 warn := warnLimiter.Warn
313 defer warnLimiter.Close() 312 defer warnLimiter.Close()
314 313
315 agmLines := []*agmLine{} 314 agmLines := []*agmLine{}
316 ignored := 0 315 ignored := 0