From c0a577d5be07fba41c5a035ea2e22d855ece29d2 Mon Sep 17 00:00:00 2001 From: Mathieu Ancelin Date: Mon, 4 Dec 2023 17:08:59 +0100 Subject: [PATCH] Safe implementation of the cleaner job --- src/main/scala/io/otoroshi/wasm4s/scaladsl/integration.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/io/otoroshi/wasm4s/scaladsl/integration.scala b/src/main/scala/io/otoroshi/wasm4s/scaladsl/integration.scala index 11a7068..46e9ea4 100644 --- a/src/main/scala/io/otoroshi/wasm4s/scaladsl/integration.scala +++ b/src/main/scala/io/otoroshi/wasm4s/scaladsl/integration.scala @@ -173,7 +173,7 @@ class WasmIntegration(ic: WasmIntegrationContext) { if (!options.exists(_.immortal)) { val maxDur = options.map(_.maxUnusedDuration).getOrElse(globalNotUsedDuration) val availableVms = pool.availableVms.asScala.toSeq.filter(_.isAquired()) - val inUseVms = pool.availabinUseVmsleVms.asScala.toSeq + val inUseVms = pool.inUseVms.asScala.toSeq val unusedVms = availableVms.filter(_.hasNotBeenUsedInTheLast(maxDur)) val tooMuchMemoryVms = (availableVms ++ inUseVms) .filter(_.consumesMoreThanMemoryPercent(options.map(_.maxMemoryUsage).getOrElse(0.9)))