Notification-Thread Implemented

This commit is contained in:
2024-12-16 21:02:55 +01:00
parent ebc30c85bf
commit c4fc2f436b
3 changed files with 84 additions and 8 deletions

View File

@ -123,16 +123,14 @@ using (var scope = app.Services.CreateScope())
context.Notifications.Add(new Notification("Tranga Started", emojis[Random.Shared.Next(0, emojis.Length - 1)], NotificationUrgency.High));
context.SaveChanges();
string TRANGA = "\n\n _______ \n|_ _|.----..---.-..-----..-----..---.-.\n | | | _|| _ || || _ || _ |\n |___| |__| |___._||__|__||___ ||___._|\n |_____| \n\n";
ILog Log = LogManager.GetLogger("Tranga");
BasicConfigurator.Configure();
Log.Info(TRANGA);
TrangaSettings.Load();
Log.Info(TrangaSettings.Serialize());
}
TrangaSettings.Load();
Tranga.StartLogger();
Tranga.JobStarterThread.Start(app.Services.GetService<PgsqlContext>()!);
Tranga.NotificationSenderThread.Start(app.Services.GetService<PgsqlContext>()!);
app.UseCors("AllowAll");
app.Run();