We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dca64f commit c335fc7Copy full SHA for c335fc7
lambdas/functions/control-plane/src/scale-runners/scale-down.ts
@@ -244,9 +244,12 @@ async function terminateOrphan(environment: string): Promise<void> {
244
245
for (const runner of orphanRunners) {
246
if (runner.runnerId) {
247
- (await lastChanceCheckOrphanRunner(runner))
248
- ? terminateRunner(runner.instanceId)
249
- : unmarkOrphan(runner.instanceId);
+ const isOrphan = await lastChanceCheckOrphanRunner(runner);
+ if (isOrphan) {
+ await terminateRunner(runner.instanceId);
250
+ } else {
251
+ await unmarkOrphan(runner.instanceId);
252
+ }
253
} else {
254
logger.info(`Terminating orphan runner '${runner.instanceId}'`);
255
await terminateRunner(runner.instanceId).catch((e) => {
0 commit comments