From 0a495abc5efc000a1d561373f1cbef0fdb29aba3 Mon Sep 17 00:00:00 2001 From: Nikolay Eskov Date: Thu, 17 Oct 2024 00:03:09 +0300 Subject: [PATCH] Fix lint. --- cmd/bots/discord/discord.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/bots/discord/discord.go b/cmd/bots/discord/discord.go index ee511146..296c4fc8 100644 --- a/cmd/bots/discord/discord.go +++ b/cmd/bots/discord/discord.go @@ -157,12 +157,16 @@ func runDiscordBot() error { }() <-ctx.Done() + waitScheduler(taskScheduler, logger) + logger.Info("Discord bot finished") + return nil +} + +func waitScheduler(taskScheduler chrono.TaskScheduler, logger *zap.Logger) { if !taskScheduler.IsShutdown() { <-taskScheduler.Shutdown() logger.Info("Task scheduler has been shutdown successfully") } - logger.Info("Discord bot finished") - return nil } func runMessagingClients(