Merge branch 'master' of ssh://git.paulbsd.com:2222/paulbsd/weather
This commit is contained in:
commit
1aad5fd64c
@ -65,6 +65,8 @@ func FetchData(wc *WeatherConfig, city string) (Data, error) {
|
||||
return Data{}, err
|
||||
}
|
||||
|
||||
defer r.Body.Close()
|
||||
|
||||
b, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
return Data{}, err
|
||||
@ -93,6 +95,7 @@ func SendToInflux(wc *WeatherConfig, d Data) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer httpClient.Close()
|
||||
|
||||
bp, err := client.NewBatchPoints(client.BatchPointsConfig{
|
||||
Database: wc.InfluxDB,
|
||||
|
Loading…
Reference in New Issue
Block a user