Mercurial > gemma
diff pkg/imports/bn.go @ 4102:3d2f02c16765 request_hist_bns
Request historic bottleneck data from SOAP service
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 26 Jul 2019 13:46:55 +0200 |
parents | 5867dcf8e93c |
children | 861760675497 |
line wrap: on
line diff
--- a/pkg/imports/bn.go Fri Jul 26 12:53:01 2019 +0200 +++ b/pkg/imports/bn.go Fri Jul 26 13:46:55 2019 +0200 @@ -24,6 +24,7 @@ "strings" "time" + "gemma.intevation.de/gemma/pkg/common" "gemma.intevation.de/gemma/pkg/pgxutils" "gemma.intevation.de/gemma/pkg/soap/ifbn" "github.com/jackc/pgx/pgtype" @@ -295,7 +296,9 @@ fetch := func() ([]*ifbn.BottleNeckType, error) { client := ifbn.NewIBottleneckService(bn.URL, bn.Insecure, nil) - req := &ifbn.Export_bn_by_isrs{} + req := &ifbn.Export_bn_by_isrs{ + Period: &ifbn.RequestedPeriod{Date_start: &time.Time{}}, + } resp, err := client.Export_bn_by_isrs(req) if err != nil { @@ -446,8 +449,13 @@ if t, ok := fromTo[toKey]; ok { tto.Set(t) uBound = pgtype.Exclusive + feedback.Info("Valid from %s to %s", + fromTo[fromKey].Format(common.TimeFormat), + fromTo[toKey].Format(common.TimeFormat)) } else { uBound = pgtype.Unbounded + feedback.Info("Valid from %s", + fromTo[fromKey].Format(common.TimeFormat)) } }