Add bundle version number on the backtest name
This commit is contained in:
@@ -195,7 +195,7 @@ public class JobService
|
||||
MaxPositionTimeHours = backtestRequest.Config.MaxPositionTimeHours,
|
||||
FlipOnlyWhenInProfit = backtestRequest.Config.FlipOnlyWhenInProfit,
|
||||
FlipPosition = backtestRequest.Config.FlipPosition,
|
||||
Name = $"{bundleRequest.Name} #{i + 1}",
|
||||
Name = $"{bundleRequest.Name} v{bundleRequest.Version} #{i + 1}",
|
||||
CloseEarlyWhenProfitable = backtestRequest.Config.CloseEarlyWhenProfitable,
|
||||
UseSynthApi = backtestRequest.Config.UseSynthApi,
|
||||
UseForPositionSizing = backtestRequest.Config.UseForPositionSizing,
|
||||
@@ -233,7 +233,8 @@ public class JobService
|
||||
{
|
||||
try
|
||||
{
|
||||
var refundSuccess = await _kaigenService.RefundUserCreditsAsync(creditRequestId, bundleRequest.User);
|
||||
var refundSuccess =
|
||||
await _kaigenService.RefundUserCreditsAsync(creditRequestId, bundleRequest.User);
|
||||
if (refundSuccess)
|
||||
{
|
||||
_logger.LogInformation(
|
||||
@@ -243,7 +244,8 @@ public class JobService
|
||||
}
|
||||
catch (Exception refundEx)
|
||||
{
|
||||
_logger.LogError(refundEx, "Error during refund attempt for user {UserName}", bundleRequest.User.Name);
|
||||
_logger.LogError(refundEx, "Error during refund attempt for user {UserName}",
|
||||
bundleRequest.User.Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +262,7 @@ public class JobService
|
||||
public async Task<Job> RetryJobAsync(Guid jobId)
|
||||
{
|
||||
var job = await _jobRepository.GetByIdAsync(jobId);
|
||||
|
||||
|
||||
if (job == null)
|
||||
{
|
||||
throw new InvalidOperationException($"Job with ID {jobId} not found.");
|
||||
@@ -270,7 +272,8 @@ public class JobService
|
||||
// Running jobs should be handled by stale job recovery, not manual retry
|
||||
if (job.Status != JobStatus.Failed && job.Status != JobStatus.Cancelled)
|
||||
{
|
||||
throw new InvalidOperationException($"Cannot retry job with status {job.Status}. Only Failed or Cancelled jobs can be retried.");
|
||||
throw new InvalidOperationException(
|
||||
$"Cannot retry job with status {job.Status}. Only Failed or Cancelled jobs can be retried.");
|
||||
}
|
||||
|
||||
// Reset job to pending state
|
||||
@@ -303,5 +306,4 @@ public class JobService
|
||||
await _jobRepository.DeleteAsync(jobId);
|
||||
_logger.LogInformation("Deleted job {JobId}", jobId);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user