chore: added defer for influxdb connection
This commit is contained in:
parent
99ce74161a
commit
329f1c7752
@ -74,7 +74,6 @@ func DownloadFile(fpc *FuelPricesConfig, zipfile *ZipFile) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
zipfile.Content, err = ioutil.ReadAll(resp.Body)
|
||||
@ -153,6 +152,8 @@ func SendToInflux(fpc *FuelPricesConfig, prices *[]Price) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defer httpClient.Close()
|
||||
|
||||
bp, err := client.NewBatchPoints(client.BatchPointsConfig{
|
||||
Database: fpc.InfluxDB,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user