mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 04:41:13 +00:00
[feature] metric related fixed. (2x)
This commit is contained in:
@@ -24,8 +24,10 @@ object Metrics {
|
||||
.register(registry)
|
||||
|
||||
fun refreshStreamerMetrics() {
|
||||
streamer = UserService.getAllUsers().size.toDouble()
|
||||
activeStreamer = UserService.getAllUsers().filter { !it.isDisabled }.size.toDouble()
|
||||
val streamers = UserService.getAllUsers()
|
||||
|
||||
streamer = streamers.size.toDouble()
|
||||
activeStreamer = streamers.filter { !it.isDisabled }.size.toDouble()
|
||||
}
|
||||
|
||||
fun increaseStreaming(inc: Int = 1) {
|
||||
@@ -34,4 +36,8 @@ object Metrics {
|
||||
fun decreaseStreaming(dec: Int = 1) {
|
||||
streaming -= dec
|
||||
}
|
||||
|
||||
init {
|
||||
refreshStreamerMetrics()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user