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.Info("Bot starting!");
|
||||||
|
|
||||||
|
_logger.Debug("Starting services");
|
||||||
|
BotServices = new BotServices(this, _cancellationToken);
|
||||||
|
BotServices.InitializeServices();
|
||||||
|
|
||||||
_kfDeadBotDetection = KfDeadBotDetectionTask();
|
_kfDeadBotDetection = KfDeadBotDetectionTask();
|
||||||
var settings = SettingsProvider.GetMultipleValuesAsync([
|
var settings = SettingsProvider.GetMultipleValuesAsync([
|
||||||
BuiltIn.Keys.KiwiFarmsWsEndpoint, BuiltIn.Keys.KiwiFarmsDomain,
|
BuiltIn.Keys.KiwiFarmsWsEndpoint, BuiltIn.Keys.KiwiFarmsDomain,
|
||||||
@@ -84,10 +88,6 @@ public class ChatBot
|
|||||||
_logger.Debug("Creating ping task");
|
_logger.Debug("Creating ping task");
|
||||||
_kfChatPing = KfPingTask();
|
_kfChatPing = KfPingTask();
|
||||||
|
|
||||||
_logger.Debug("Starting services");
|
|
||||||
BotServices = new BotServices(this, _cancellationToken);
|
|
||||||
BotServices.InitializeServices();
|
|
||||||
|
|
||||||
_logger.Debug("Blocking the main thread");
|
_logger.Debug("Blocking the main thread");
|
||||||
var exitEvent = new ManualResetEvent(false);
|
var exitEvent = new ManualResetEvent(false);
|
||||||
exitEvent.WaitOne();
|
exitEvent.WaitOne();
|
||||||
|
|||||||
Reference in New Issue
Block a user