Allow the bot's services to fully initialize even if the website is completely dead so that auto capture works

This commit is contained in:
barelyprofessional
2025-09-21 13:01:19 -05:00
parent 7356018805
commit 8fca8829f6

View File

@@ -39,6 +39,10 @@ public class ChatBot
{
_logger.Info("Bot starting!");
_logger.Debug("Starting services");
BotServices = new BotServices(this, _cancellationToken);
BotServices.InitializeServices();
_kfDeadBotDetection = KfDeadBotDetectionTask();
var settings = SettingsProvider.GetMultipleValuesAsync([
BuiltIn.Keys.KiwiFarmsWsEndpoint, BuiltIn.Keys.KiwiFarmsDomain,
@@ -84,10 +88,6 @@ public class ChatBot
_logger.Debug("Creating ping task");
_kfChatPing = KfPingTask();
_logger.Debug("Starting services");
BotServices = new BotServices(this, _cancellationToken);
BotServices.InitializeServices();
_logger.Debug("Blocking the main thread");
var exitEvent = new ManualResetEvent(false);
exitEvent.WaitOne();