mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-20 18:17:54 +02:00
JobContext per Job
This commit is contained in:
@ -172,7 +172,9 @@ public static class Tranga
|
||||
{
|
||||
Thread t = new(() =>
|
||||
{
|
||||
job.Run(serviceProvider);
|
||||
using IServiceScope jobScope = serviceProvider.CreateScope();
|
||||
PgsqlContext jobContext = jobScope.ServiceProvider.GetRequiredService<PgsqlContext>();
|
||||
job.Run(jobContext);
|
||||
});
|
||||
RunningJobs.Add(t, job);
|
||||
t.Start();
|
||||
|
Reference in New Issue
Block a user