mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-17 00:37:54 +02:00
Scoped PGSql Contexts for Threads
This commit is contained in:
@ -128,8 +128,8 @@ using (var scope = app.Services.CreateScope())
|
||||
|
||||
TrangaSettings.Load();
|
||||
Tranga.StartLogger();
|
||||
Tranga.JobStarterThread.Start(app.Services.GetService<PgsqlContext>()!);
|
||||
Tranga.NotificationSenderThread.Start(app.Services.GetService<PgsqlContext>()!);
|
||||
Tranga.JobStarterThread.Start(app.Services.CreateScope().ServiceProvider.GetService<PgsqlContext>());
|
||||
Tranga.NotificationSenderThread.Start(app.Services.CreateScope().ServiceProvider.GetService<PgsqlContext>());
|
||||
|
||||
app.UseCors("AllowAll");
|
||||
|
||||
|
Reference in New Issue
Block a user