using PARR.AIHITMainLoader;

namespace PARR.AIHITLoaderWorker
{
    public class Worker : BackgroundService
    {
        private readonly ILogger<Worker> _logger;
        private readonly IAihitMainLoader aihitMainLoader;

        public Worker(
            ILogger<Worker> logger,
            IAihitMainLoader aihitMainLoader
            )
        {
            _logger = logger;
            this.aihitMainLoader = aihitMainLoader;
        }


        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            await aihitMainLoader.StartAsync();
            await Task.Delay(Timeout.Infinite, stoppingToken);
        }
    }
}
