Fix API offset limit 400 Bad Request, implement requested UI/UX improvements
This commit is contained in:
@@ -72,9 +72,10 @@ public class TradeRetentionWorker : BackgroundService
|
||||
var compactionCutoff = utcNow.Date.AddDays(-compactionDays);
|
||||
|
||||
// 1. Prune Old Trades (C1 & C2)
|
||||
// Exclude trades if the trader is on any active Watchlist
|
||||
_logger.LogInformation("Pruning trades older than {Cutoff}...", retentionCutoff);
|
||||
var deletedCount = await db.Trades
|
||||
.Where(t => t.ExecutedAt < retentionCutoff)
|
||||
.Where(t => t.ExecutedAt < retentionCutoff && !t.Trader.WatchlistEntries.Any())
|
||||
.ExecuteDeleteAsync(ct);
|
||||
|
||||
_logger.LogInformation("Pruned {Count} old trades from the database.", deletedCount);
|
||||
|
||||
Reference in New Issue
Block a user