public static void Initialize(FeriadoSeeder seeder) { try { seeder.AtualizarAsync().Wait(); } catch {} }
protected override async Task ExecuteAsync(CancellationToken stoppingToken) { while (!stoppingToken.IsCancellationRequested) { System.Console.WriteLine("Atualizando Feriados"); try { await _seeder.AtualizarAsync(stoppingToken); } catch {} await Task.Delay(15 *60 *1000, stoppingToken); } }