using PARR.EsppOrderLoader;

namespace PARR.EsppOrderLoaderWorker
{
    public class Worker : BackgroundService
    {
        private readonly ILogger<Worker> _logger;
        private readonly IEsppOrderLoader esppOrderLoader;

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

        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            await esppOrderLoader.StartAsync();
        }
    }
}