Add admin endpoint to delete bundle backtest requests and implement related UI functionality + Add job resilient

This commit is contained in:
2025-11-10 12:28:07 +07:00
parent 0861e9a8d2
commit 91c766de86
11 changed files with 429 additions and 39 deletions

View File

@@ -926,6 +926,20 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
}
}
public async Task DeleteBundleBacktestRequestByIdAsync(Guid id)
{
var entity = await _context.BundleBacktestRequests
.AsTracking()
.FirstOrDefaultAsync(b => b.RequestId == id)
.ConfigureAwait(false);
if (entity != null)
{
_context.BundleBacktestRequests.Remove(entity);
await _context.SaveChangesAsync().ConfigureAwait(false);
}
}
public IEnumerable<BundleBacktestRequest> GetBundleBacktestRequestsByStatus(BundleBacktestRequestStatus status)
{
var entities = _context.BundleBacktestRequests