protected PeriodicAsyncTask(TelegramNotificationBot bot)
        {
            Bot         = bot;
            TokenSource = new CancellationTokenSource();
            var token = TokenSource.Token;

            RunnerThread = new Thread(() =>
            {
                while (!token.IsCancellationRequested)
                {
                    try
                    {
                        Task.Run(() => TryRunAsync(token), token).Wait(token);
                    }
                    catch (Exception e)
                    {
                        if (!token.IsCancellationRequested)
                        {
                            Console.Out.WriteLine(e);
                        }
                    }
                }
            });
        }
 public NotificationTask(TelegramNotificationBot bot, BookingStatusLoader bookingStatusLoader)
     : base(bot)
 {
     BookingStatusLoader = bookingStatusLoader;
 }
 public VerificationTask(TelegramNotificationBot bot, TelegramNotificationsDB notificationsDB)
     : base(bot)
 {
     NotificationsDB = notificationsDB;
 }