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.
scale-ignore-players
1 parent 8d7e4ec commit a912bbeCopy full SHA for a912bbe
controller-runtime/src/main/kotlin/app/simplecloud/controller/runtime/reconciler/GroupReconciler.kt
@@ -58,7 +58,15 @@ class GroupReconciler(
58
return
59
60
val serverCountToStop = fullyStartedServers.size - this.group.minOnlineCount
61
- fullyStartedServers
+ val serversToConsider = if (this.group.properties["scale-ignore-players"]?.toBoolean() == true) {
62
+ // If scale-ignore-players is true, consider all fully started servers
63
+ fullyStartedServers
64
+ } else {
65
+ // If scale-ignore-players is false, only consider servers without players
66
+ fullyStartedServers.filter { it.playerCount == 0L }
67
+ }
68
+
69
+ serversToConsider
70
.filter { !wasUpdatedRecently(it) }
71
.shuffled()
72
.take(serverCountToStop.toInt())
0 commit comments