feat: Add monitoring alerts skeleton and enhance worker with notifications
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user