We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2b1033 commit 3617608Copy full SHA for 3617608
1 file changed
lambdas/functions/control-plane/src/scale-runners/scale-down.ts
@@ -230,8 +230,9 @@ async function lastChanceCheckOrphanRunner(runner: RunnerList): Promise<boolean>
230
logger.debug(
231
`Runner '${runner.instanceId}' is '${state.status}' and is currently '${state.busy ? 'busy' : 'idle'}'.`,
232
);
233
- const isOfflineAndBusy = state.status === 'offline' && (state.busy || !state.busy);
234
- if (isOfflineAndBusy) {
+ const isOfflineAndBusy = state.status === 'offline' && state.busy;
+ const isOfflineAndIdle = state.status === 'offline' && !state.busy;
235
+ if (isOfflineAndBusy || isOfflineAndIdle) {
236
isOrphan = true;
237
}
238
logger.info(`Runner '${runner.instanceId}' is judged to ${isOrphan ? 'be' : 'not be'} orphaned.`);
0 commit comments