refactor, security updates, cv extraction upgrades
This commit is contained in:
@@ -10,22 +10,26 @@ namespace JobTrackerApi.Services
|
||||
private readonly ILogger<DailyExportHostedService> _logger;
|
||||
private readonly IConfiguration _cfg;
|
||||
private readonly AppPaths _paths;
|
||||
private readonly IStartupReadiness _startupReadiness;
|
||||
|
||||
public DailyExportHostedService(
|
||||
IServiceProvider sp,
|
||||
ILogger<DailyExportHostedService> logger,
|
||||
IConfiguration cfg,
|
||||
AppPaths paths)
|
||||
AppPaths paths,
|
||||
IStartupReadiness startupReadiness)
|
||||
{
|
||||
_sp = sp;
|
||||
_logger = logger;
|
||||
_cfg = cfg;
|
||||
_paths = paths;
|
||||
_startupReadiness = startupReadiness;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
var enabled = _cfg.GetValue("Exports:DailyEnabled", true);
|
||||
await _startupReadiness.WaitUntilReadyAsync(stoppingToken);
|
||||
if (!enabled)
|
||||
{
|
||||
_logger.LogInformation("Daily export disabled (Exports:DailyEnabled=false).");
|
||||
|
||||
Reference in New Issue
Block a user