Skip to content

Commit

Permalink
fixup! expr: refactor for avoid global evaluator usage
Browse files Browse the repository at this point in the history
  • Loading branch information
msaf1980 committed Jan 29, 2024
1 parent c1b3322 commit fb4ff97
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions expr/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ type Evaluator struct {
}

func (eval Evaluator) Fetch(ctx context.Context, exprs []parser.Expr, from, until int64, values map[parser.MetricRequest][]*types.MetricData) (map[parser.MetricRequest][]*types.MetricData, error) {
if eval.zipper == nil {
// TODO: may be return error or not check. But for use expr in external applications without CarbonZipper implementation
return values, nil
}

if err := eval.limiter.Enter(ctx); err != nil {
return nil, err
}
Expand Down

0 comments on commit fb4ff97

Please sign in to comment.