using PARR.NextRun;

namespace PARR.NextRunWorker
{
    public class Worker : BackgroundService
    {
        private readonly INextRunManager nextRunManager;

        public Worker(INextRunManager nextRunManager)
        {
            this.nextRunManager = nextRunManager;
        }

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