Skip to content

Commit

Permalink
Correct planner's behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
phantasia15 authored Jun 24, 2021
1 parent 290741f commit c821a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func (p *planner) Plan(ctx context.Context) error {

ctx = logger.WithContext(ctx, log)

free := max(capacity-running-p.buffer, 0)
diff := serverDiff(pending, free, p.cap)
free := max(capacity-running, 0)
diff := serverDiff(pending+p.buffer, free, p.cap)

// if the server differential to handle the build volume
// is positive, we can reduce server capacity.
Expand Down

0 comments on commit c821a61

Please sign in to comment.