remove default Worker

This commit is contained in:
2026-07-22 11:57:53 +02:00
parent 958352a720
commit 1404f90729
2 changed files with 0 additions and 17 deletions

View File

@@ -52,7 +52,6 @@ try
builder.Configuration.GetSection("EmailAccount"));
// Register Background Workers
builder.Services.AddHostedService<Worker>();
builder.Services.AddHostedService<EmailSenderWorker>();
builder.Services.AddControllers();

View File

@@ -1,16 +0,0 @@
namespace DigitalData.EmailProfiler.API;
public class Worker(ILogger<Worker> Logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
if (Logger.IsEnabled(LogLevel.Information))
{
Logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
}
await Task.Delay(1000, stoppingToken);
}
}
}