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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user