fix: harden Structural S/R after OHLCV writes and surface cleanup failures
Honor custom S/R tolerance as a transient detect, refresh levels after OHLCV mutations without failing committed price writes, report per-ticker S/R rebuild failures from admin cleanup, and warn in the admin UI when refresh is partial.
This commit is contained in:
@@ -269,9 +269,18 @@ export function acknowledgeSystemEvents(days = 7) {
|
||||
}
|
||||
|
||||
// Data cleanup
|
||||
export interface CleanupResult {
|
||||
ohlcv: number;
|
||||
sentiment: number;
|
||||
fundamentals: number;
|
||||
sr_refresh_ok: number;
|
||||
sr_refresh_failed: number;
|
||||
sr_refresh_failures: { symbol: string; error: string }[];
|
||||
}
|
||||
|
||||
export function cleanupData(olderThanDays: number) {
|
||||
return apiClient
|
||||
.post<{ message: string }>('admin/data/cleanup', {
|
||||
.post<CleanupResult>('admin/data/cleanup', {
|
||||
older_than_days: olderThanDays,
|
||||
})
|
||||
.then((r) => r.data);
|
||||
|
||||
Reference in New Issue
Block a user