Skip to content

Commit c821a61

Browse files
authored
Correct planner's behaviour
1 parent 290741f commit c821a61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/planner.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func (p *planner) Plan(ctx context.Context) error {
7575

7676
ctx = logger.WithContext(ctx, log)
7777

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

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

0 commit comments

Comments
 (0)