reducing memory usage in job runner

This commit is contained in:
Andy Pack 2024-09-29 10:15:11 +01:00
parent c6cc09b422
commit 5ff8d3409b
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -8,7 +8,7 @@ public class SouthernWaterApiJobRunner(SouthernWaterApi client, ILogger<Southern
{
protected readonly ILogger<SouthernWaterApiJobRunner> _logger = logger;
public async Task<SouthernWaterApiJob> LoadSpills(int? pageLimit = null)
public async Task LoadSpills(int? pageLimit = null)
{
var interval = Static.Interval;
var job = new SouthernWaterApiJob
@ -39,7 +39,7 @@ public class SouthernWaterApiJobRunner(SouthernWaterApi client, ILogger<Southern
page.items.ForEach(s => s.JobId = job._id);
job.TotalItems = page.totalItems;
job.Spills.AddRange(page.items);
// job.Spills.AddRange(page.items);
try
{
await PageLoaded(job, page);
@ -62,8 +62,6 @@ public class SouthernWaterApiJobRunner(SouthernWaterApi client, ILogger<Southern
{
_logger.LogError(e, "Exception while running job finished callback");
}
return job;
}
protected virtual Task JobCreated(SouthernWaterApiJob job)