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:
parent
bb0a59448f
commit
fad4ca4414
10 changed files with 89 additions and 28 deletions
|
|
@ -3,6 +3,8 @@ using System.Threading.Tasks;
|
|||
using API.Data;
|
||||
using API.Entities;
|
||||
using API.Interfaces;
|
||||
using API.Interfaces.Services;
|
||||
using API.Services;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
@ -40,6 +42,15 @@ namespace API
|
|||
var logger = services.GetRequiredService < ILogger<Program>>();
|
||||
logger.LogError(ex, "An error occurred during migration");
|
||||
}
|
||||
|
||||
// Load all tasks from DI (TODO: This is not working)
|
||||
var startupTasks = host.Services.GetServices<WarmupServicesStartupTask>();
|
||||
|
||||
// Execute all the tasks
|
||||
foreach (var startupTask in startupTasks)
|
||||
{
|
||||
await startupTask.ExecuteAsync();
|
||||
}
|
||||
|
||||
await host.RunAsync();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue