Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the load balancer immediately aware of the number of playing players #28

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ data class Penalties(val node: LavalinkNode) {
// The way we calculate penalties is heavily based on the original Lavalink client.

// This will serve as a rule of thumb. 1 playing player = 1 penalty point
val playerPenalty = stats.playingPlayers
val playerPenalty = node.playerCache.count { it.value.track != null && !it.value.paused }
duncte123 marked this conversation as resolved.
Show resolved Hide resolved

val cpuPenalty = (1.05.pow(100 * stats.cpu.systemLoad) * 10 - 10).toInt()

Expand Down
Loading