Fix bundle completion

This commit is contained in:
2025-11-12 22:40:58 +07:00
parent ac711ac420
commit a8f55c80a9
2 changed files with 12 additions and 151 deletions

View File

@@ -343,7 +343,18 @@ public class BacktestComputeWorker : BackgroundService
"Completed backtest job {JobId}. Score: {Score}, PnL: {PnL}, Duration: {DurationMinutes:F1} minutes",
job.Id, result.Score, result.FinalPnl, elapsedTime.TotalMinutes);
// Bundle request is now updated in the BacktestExecutor
// Update bundle request progress if this job is part of a bundle
if (job.BundleRequestId.HasValue)
{
try
{
await UpdateBundleRequestProgress(job.BundleRequestId.Value, scope.ServiceProvider);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error updating bundle request progress for job {JobId}", job.Id);
}
}
}
catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested)
{