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