Open freyacodes opened 7 years ago
IDEA: make thread that constantly reads CPU usage...
Lavaplayer already does this for the remote nodes I am interested in.
Info for anyone touching this in the future: check the NodesCommand
class on how to access information from the nodes
It's a known fact that FredBoat sometimes suffers from extreme load causing the bot to stutter since it can't process music fast enough.
I want to create a system that throttles a number of players being actively used based on the CPU usage of the nodes.
I'm thinking the bot would reject new players from starting if the average node CPU usage is >98%. Paused players should be given a grace period of a few minutes to not introduce a fear of losing the right to play music when pausing.
If access is rejected the bot would instead send a message explaining the situation and how they can help.