This commit is contained in:
2026-02-17 09:47:41 -05:00
parent dcd1a9ccec
commit fe97a1e51a
18 changed files with 107 additions and 123 deletions

View File

@@ -32,15 +32,11 @@ namespace PartSource.Automation.Jobs
{
_logger = logger;
_whiSeoService = whiSeoService;
_seoDataType = SeoDataType.Fitment;
_ftpConfiguration = configuration.GetSection("ftpServers:WhiConfiguration").Get<FtpConfiguration>();
_noteDictionary = new ConcurrentDictionary<string, string>();
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability", "CA2008:Do not create tasks without passing a TaskScheduler", Justification = "<Pending>")]
public async Task Run(CancellationToken token, params string[] arguments)
{
_whiSeoService.TruncateFitmentTables();
@@ -56,7 +52,7 @@ namespace PartSource.Automation.Jobs
fileGroups.Enqueue(fileGroup);
}
Task[] taskArray = new Task[18];
Task[] taskArray = new Task[12];
for (int i = 0; i < taskArray.Length; i++)
{
taskArray[i] = Task.Factory.StartNew(() =>
@@ -91,12 +87,12 @@ namespace PartSource.Automation.Jobs
_logger.LogInformation($"Created fitment table for part group {tableName}.");
}
});
}, token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
}
Task.WaitAll(taskArray);
_whiSeoService.SaveNotes(_noteDictionary);
_whiSeoService.SaveNotes(_noteDictionary);
_whiSeoService.CreateFitmentView();
}