mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-17 00:37:54 +02:00
[postgres-Server-V2] feat(Jobs): Instead of passing context to each job, pass service provider and let the job create its own context
This commit is contained in:
@ -124,7 +124,7 @@ using (var scope = app.Services.CreateScope())
|
||||
|
||||
TrangaSettings.Load();
|
||||
Tranga.StartLogger();
|
||||
Tranga.JobStarterThread.Start(app.Services.CreateScope().ServiceProvider.GetService<PgsqlContext>());
|
||||
Tranga.JobStarterThread.Start(app.Services);
|
||||
Tranga.NotificationSenderThread.Start(app.Services.CreateScope().ServiceProvider.GetService<PgsqlContext>());
|
||||
|
||||
app.UseCors("AllowAll");
|
||||
|
Reference in New Issue
Block a user