Fixes
This commit is contained in:
parent
45ad55a648
commit
066e210d8a
3 changed files with 4 additions and 4 deletions
|
@ -27,7 +27,8 @@ func dayStart(t time.Time) time.Time {
|
|||
var errNon200 = errors.New("got a non-200 status code. Check the correctness of sensors IDs")
|
||||
|
||||
func (config *Config) queryHistory(entityID string, startTime, endTime time.Time) (HistoryResult, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
req, err := http.NewRequestWithContext(
|
||||
ctx,
|
||||
http.MethodGet,
|
||||
|
@ -40,7 +41,6 @@ func (config *Config) queryHistory(entityID string, startTime, endTime time.Time
|
|||
),
|
||||
http.NoBody,
|
||||
)
|
||||
cancel()
|
||||
if err != nil {
|
||||
return HistoryResult{}, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue