Skip to content

Commit a245b2b

Browse files
committed
fix: improve logging message for orphan runner judgment
1 parent f5a0388 commit a245b2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ async function lastChanceCheckOrphanRunner(runner: RunnerList): Promise<boolean>
230230
logger.debug(
231231
`Runner '${runner.instanceId}' is '${state.status}' and is currently '${state.busy ? 'busy' : 'idle'}'.`,
232232
);
233-
const isOfflineAndBusy = state.status === 'offline' && state.busy;
233+
const isOfflineAndBusy = state.status === 'offline' && (state.busy || !state.busy);
234234
if (isOfflineAndBusy) {
235235
isOrphan = true;
236236
}
237-
logger.info(`Runner '${runner.instanceId}' ${isOrphan ? 'is judged to be' : 'is judged to not be'} orphaned.`);
237+
logger.info(`Runner is judged to '${runner.instanceId}' ${isOrphan ? 'be' : 'not be'} orphaned.`);
238238
return isOrphan;
239239
}
240240

0 commit comments

Comments
 (0)