Skip to content

Commit

Permalink
fix: fix wrong heartbeat message
Browse files Browse the repository at this point in the history
  • Loading branch information
nidbCN committed Dec 17, 2024
1 parent 76548be commit e688eaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions StreamingCaptureBot.Core/HeartbeatWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var assemblyName = GetType().Assembly.GetName();

var message = "Heartbeat time: {0:G}.\n"
var template = "Heartbeat time: {0:G}.\n"
+ $"From bot {botCtx.BotName}@{botCtx.BotUin}\n"
+ $"Bot app {assemblyName.Name} v{assemblyName.Version}, "
+ $"running on {Environment.OSVersion.VersionString}(.NET {Environment.Version}) "
Expand All @@ -33,7 +33,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
await Task.Delay(botOptions.Value.NotificationConfig.HeartbeatInterval,
stoppingToken);

message = string.Format(formatter, message, DateTime.Now, Environment.WorkingSet);
var message = string.Format(formatter, template, DateTime.Now, Environment.WorkingSet);

if (botOptions.Value.NotificationConfig is
{ NotifyWebhookOnHeartbeat: true, WebhookUrl: not null })
Expand Down

0 comments on commit e688eaf

Please sign in to comment.