using PARR.Master;

namespace PARR.MasterWorker
{
    public class Worker : BackgroundService
    {
        private readonly ILogger<Worker> _logger;
        private readonly IMaster master;

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

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