mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user