refactor, security updates, cv extraction upgrades
This commit is contained in:
@@ -7,14 +7,17 @@ namespace JobTrackerApi.Services
|
||||
public sealed class RulesHostedService : BackgroundService
|
||||
{
|
||||
private readonly IServiceProvider _services;
|
||||
private readonly IStartupReadiness _startupReadiness;
|
||||
|
||||
public RulesHostedService(IServiceProvider services)
|
||||
public RulesHostedService(IServiceProvider services, IStartupReadiness startupReadiness)
|
||||
{
|
||||
_services = services;
|
||||
_startupReadiness = startupReadiness;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
await _startupReadiness.WaitUntilReadyAsync(stoppingToken);
|
||||
// Small initial delay to let app start.
|
||||
await Task.Delay(TimeSpan.FromSeconds(2), stoppingToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user