Skip to content

Commit

Permalink
Multiply maxResolution by 1000 in grpc api
Browse files Browse the repository at this point in the history
Signed-off-by: Oron Sharabi <[email protected]>
  • Loading branch information
oronsh committed Aug 22, 2022
1 parent 2ec59bb commit d65fb64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/query/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer
maxResolution = g.defaultMaxResolutionSeconds.Milliseconds() / 1000
}

lookbackDelta := g.lookbackDeltaCreate(maxResolution)
lookbackDelta := g.lookbackDeltaCreate(maxResolution * 1000)
if request.LookbackDeltaSeconds > 0 {
lookbackDelta = time.Duration(request.LookbackDeltaSeconds) * time.Second
}
Expand Down Expand Up @@ -136,7 +136,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que
maxResolution = g.defaultMaxResolutionSeconds.Milliseconds() / 1000
}

lookbackDelta := g.lookbackDeltaCreate(maxResolution)
lookbackDelta := g.lookbackDeltaCreate(maxResolution * 1000)
if request.LookbackDeltaSeconds > 0 {
lookbackDelta = time.Duration(request.LookbackDeltaSeconds) * time.Second
}
Expand Down

0 comments on commit d65fb64

Please sign in to comment.