Feat: Ajustes de seguridad
This commit is contained in:
@@ -43,14 +43,19 @@ public class AdExpirationService : BackgroundService
|
||||
await ProcessWeeklyStatsAsync();
|
||||
await ProcessPaymentRemindersAsync();
|
||||
await ProcessUnreadMessagesRemindersAsync();
|
||||
|
||||
// Ejecutar cada 1 hora
|
||||
await Task.Delay(TimeSpan.FromHours(1), stoppingToken);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
break;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error CRÍTICO en ciclo de mantenimiento.");
|
||||
await Task.Delay(TimeSpan.FromMinutes(5), stoppingToken);
|
||||
}
|
||||
|
||||
// Ejecutar cada 1 hora
|
||||
await Task.Delay(TimeSpan.FromHours(1), stoppingToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user