Lots of Hangfire attempts to solve the lock issue. Not sure how to fix it. Added some APIs for streams.

This commit is contained in:
Joseph Milazzo 2021-03-15 13:49:13 -05:00
parent bb0a59448f
commit fad4ca4414
10 changed files with 89 additions and 28 deletions

View file

@ -18,14 +18,13 @@ namespace API.Services
_provider = provider;
}
public Task ExecuteAsync(CancellationToken cancellationToken)
public Task ExecuteAsync(CancellationToken cancellationToken = default)
{
using (var scope = _provider.CreateScope())
using var scope = _provider.CreateScope();
foreach (var singleton in GetServices(_services))
{
foreach (var singleton in GetServices(_services))
{
scope.ServiceProvider.GetServices(singleton);
}
Console.WriteLine("DI preloading of " + singleton.FullName);
scope.ServiceProvider.GetServices(singleton);
}
return Task.CompletedTask;