Refactor: Replace EmailSenderWorker with AsyncIniteWorker

Removed EmailSenderWorker and its configuration, including
EmailSenderWorkerConfiguration. Introduced AsyncIniteWorker
as a replacement, simplifying the design by removing
configuration-based toggling.

- Deleted EmailSenderWorkerConfiguration.cs.
- Removed EmailSenderWorker and its registration from Program.cs.
- Registered AsyncIniteWorker in DependencyInjection.cs.
- Renamed and refactored EmailSenderWorker to AsyncIniteWorker.
- Updated namespace and removed unused configuration dependencies.
This commit is contained in:
2026-07-24 11:54:34 +02:00
parent 4a6af885de
commit d91ed70001
4 changed files with 11 additions and 35 deletions

View File

@@ -2,6 +2,7 @@ using DigitalData.EmailProfiler.Application.Common.Interfaces;
using DigitalData.EmailProfiler.Infrastructure.Messaging;
using DigitalData.EmailProfiler.Infrastructure.Queue;
using DigitalData.EmailProfiler.Infrastructure.Services;
using DigitalData.EmailProfiler.Infrastructure.Services.Background;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -42,6 +43,9 @@ public static class DependencyInjection
.PersistKeysToFileSystem(new DirectoryInfo(@"C:\ProgramData\EmailService\Keys"))
.SetApplicationName("EmailProfiler");
// Register Background Workers
services.AddHostedService<AsyncIniteWorker>();
return services;
}
}