mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-08 05:11:12 +00:00
[feature] metric related fixed.
This commit is contained in:
@@ -16,7 +16,7 @@ import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import space.mori.chzzk_bot.common.events.ChzzkUserFindEvent
|
||||
import space.mori.chzzk_bot.common.events.ChzzkUserReceiveEvent
|
||||
import space.mori.chzzk_bot.webserver.routes.GuildSettings
|
||||
import space.mori.chzzk_bot.common.metrics.Metrics
|
||||
|
||||
@Serializable
|
||||
data class GetUserDTO(
|
||||
@@ -184,6 +184,8 @@ fun Routing.apiRoutes() {
|
||||
UserService.setIsDisabled(user, body.isBotDisabled)
|
||||
UserService.setIsStartupDisabled(user, body.isBotMsgDisabled)
|
||||
|
||||
Metrics.refreshStreamerMetrics()
|
||||
|
||||
call.respond(HttpStatusCode.OK, body)
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ fun Routing.metricRoutes() {
|
||||
val registry: PrometheusMeterRegistry by inject(PrometheusMeterRegistry::class.java)
|
||||
|
||||
dispatcher.subscribe(UserRegisterEvent::class) {
|
||||
Metrics.streamer++
|
||||
Metrics.refreshStreamerMetrics()
|
||||
}
|
||||
|
||||
get("/metrics") {
|
||||
|
Reference in New Issue
Block a user