Skip to content

Commit

Permalink
Safe implementation of the cleaner job
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Dec 4, 2023
1 parent faf595d commit c0a577d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit c0a577d

Please sign in to comment.