feat: Enhance network membership and withdrawal processing with user tracking and logging
This commit is contained in:
@@ -3,6 +3,7 @@ using CMSMicroservice.Infrastructure.Persistence;
|
||||
using CMSMicroservice.Infrastructure.Persistence.Interceptors;
|
||||
using CMSMicroservice.Infrastructure.BackgroundJobs;
|
||||
using CMSMicroservice.Infrastructure.Services.Monitoring;
|
||||
using CMSMicroservice.Infrastructure.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
@@ -18,6 +19,10 @@ public static class ConfigureServices
|
||||
{
|
||||
public static IServiceCollection AddInfrastructureServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
// Configuration Settings
|
||||
services.Configure<EmailSettings>(configuration.GetSection(EmailSettings.SectionName));
|
||||
services.Configure<SmsSettings>(configuration.GetSection(SmsSettings.SectionName));
|
||||
|
||||
services.AddScoped<AuditableEntitySaveChangesInterceptor>();
|
||||
services.AddScoped<ApplicationDbContextInitialiser>();
|
||||
services.AddScoped<IGenerateJwtToken, GenerateJwtTokenService>();
|
||||
@@ -27,8 +32,9 @@ public static class ConfigureServices
|
||||
services.AddScoped<IUserNotificationService, UserNotificationService>();
|
||||
services.AddScoped<IApplicationDbContext>(p => p.GetRequiredService<ApplicationDbContext>());
|
||||
|
||||
// Background Workers
|
||||
services.AddHostedService<WeeklyNetworkCommissionWorker>();
|
||||
// Background Workers - Deprecated: Using Hangfire instead
|
||||
// services.AddHostedService<WeeklyNetworkCommissionWorker>();
|
||||
services.AddScoped<WeeklyCommissionJob>(); // Hangfire Job (Scoped for DI)
|
||||
|
||||
if (configuration.GetValue<bool>("UseInMemoryDatabase"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user