Skip to content

Commit b8af3f0

Browse files
committed
fix: simplify orphan runner judgment logic by removing checks that infringe on other checks
1 parent 3617608 commit b8af3f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lambdas/functions/control-plane/src/scale-runners/scale-down.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ async function lastChanceCheckOrphanRunner(runner: RunnerList): Promise<boolean>
231231
`Runner '${runner.instanceId}' is '${state.status}' and is currently '${state.busy ? 'busy' : 'idle'}'.`,
232232
);
233233
const isOfflineAndBusy = state.status === 'offline' && state.busy;
234-
const isOfflineAndIdle = state.status === 'offline' && !state.busy;
235-
if (isOfflineAndBusy || isOfflineAndIdle) {
234+
if (isOfflineAndBusy) {
236235
isOrphan = true;
237236
}
238237
logger.info(`Runner '${runner.instanceId}' is judged to ${isOrphan ? 'be' : 'not be'} orphaned.`);

0 commit comments

Comments
 (0)