using bdAsegasa.db; using Servicio_Gestion_Asegasa.Procesos; using System.Reflection; namespace Servicio_Gestion_Asegasa { public class Worker : BackgroundService { private readonly ILogger _logger; public Worker(ILogger logger) { _logger = logger; } protected override async Task ExecuteAsync(CancellationToken stoppingToken) { // await ProcesosMensajes.EnviaSMSAsync(); while (!stoppingToken.IsCancellationRequested) { if (_logger.IsEnabled(LogLevel.Information)) { _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); } await Task.Delay(1000, stoppingToken); } } } }