From f5f7b3736c0b486e2c7ec13a2d8e00268ad3a34b Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 24 Apr 2022 11:47:06 +0100 Subject: [PATCH] Show bot id in coroutine name for heartbeat jobs --- .../kotlin/network/components/HeartbeatScheduler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/components/HeartbeatScheduler.kt b/mirai-core/src/commonMain/kotlin/network/components/HeartbeatScheduler.kt index ba2ea8584..9454657ca 100644 --- a/mirai-core/src/commonMain/kotlin/network/components/HeartbeatScheduler.kt +++ b/mirai-core/src/commonMain/kotlin/network/components/HeartbeatScheduler.kt @@ -52,7 +52,7 @@ internal class TimeBasedHeartbeatSchedulerImpl( STAT_HB -> { list += launchHeartbeatJobAsync( scope = scope, - name = "StatHeartbeat", + name = "${network.context.bot.id}.StatHeartbeat", delay = { configuration.statHeartbeatPeriodMillis }, timeout = { timeout }, action = { heartbeatProcessor.doStatHeartbeatNow(network) }, @@ -62,7 +62,7 @@ internal class TimeBasedHeartbeatSchedulerImpl( REGISTER -> { list += launchHeartbeatJobAsync( scope = scope, - name = "RegisterHeartbeat", + name = "${network.context.bot.id}.RegisterHeartbeat", delay = { configuration.statHeartbeatPeriodMillis }, timeout = { timeout }, action = { heartbeatProcessor.doRegisterNow(network) }, @@ -75,7 +75,7 @@ internal class TimeBasedHeartbeatSchedulerImpl( list += launchHeartbeatJobAsync( scope = scope, - name = "AliveHeartbeat", + name = "${network.context.bot.id}.AliveHeartbeat", delay = { configuration.heartbeatPeriodMillis }, timeout = { timeout }, action = { heartbeatProcessor.doAliveHeartbeatNow(network) },