feat: Add monitoring alerts skeleton and enhance worker with notifications

This commit is contained in:
masoodafar-web
2025-11-30 20:18:10 +03:30
parent 55fa71e09b
commit 199e7e99d1
23 changed files with 5038 additions and 1168 deletions

View File

@@ -1,8 +1,10 @@
using CMSMicroservice.Infrastructure.Persistence;
using CMSMicroservice.Infrastructure.Data.Seeding;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using Serilog.Core;
using Serilog;
using System.Reflection;
@@ -99,6 +101,12 @@ if (app.Environment.IsDevelopment())
var initialiser = scope.ServiceProvider.GetRequiredService<ApplicationDbContextInitialiser>();
await initialiser.InitialiseAsync();
await initialiser.SeedAsync();
// Run Migration: ParentId → NetworkParentId (فقط یکبار اجرا می‌شود)
var migrationLogger = scope.ServiceProvider.GetRequiredService<ILogger<NetworkParentIdMigrationSeeder>>();
var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
var migrationSeeder = new NetworkParentIdMigrationSeeder(dbContext, migrationLogger);
await migrationSeeder.SeedAsync();
}
}
else