fix: IREN/ASTS/IRE stuck-pending + corridor feature
Fix stuck adapter_queue jobs (ASTS/IRE/IREN stuck pending forever): 1. fetchSpec early-return paths (cooldown checks) now update job status to 'backoff' with last_attempt set and 30s backoff_until, instead of returning without any status change. Prevents jobs from being re-processed every drain cycle indefinitely. 2. Wrap adapter.fetchOne() in 30s Promise.race timeout. A hung HTTP request no longer blocks the entire per-source promise chain forever, preventing all subsequent jobs for that source. Also includes corridor/confluence feature, tiered quote schedules, cache improvements, and HoldingsBookView refinements.
This commit is contained in:
@@ -1474,6 +1474,61 @@ export const api = {
|
||||
trpcQuery<{ slots: unknown[]; note: string }>("confluence.scorecard", symbol ? { symbol } : {}),
|
||||
saveRack: (input: { id?: string; name: string; description?: string; slotIds: string[] }) =>
|
||||
trpcMutate<{ id: string; name: string; slotIds: string[]; isSystem: boolean; description: string | null }>("confluence.saveRack", input),
|
||||
corridorSnapshot: (symbol: string) =>
|
||||
trpcQuery<{
|
||||
symbol: string;
|
||||
snapshot: Record<string, unknown> | null;
|
||||
spy: Record<string, unknown> | null;
|
||||
series: Array<Record<string, unknown>>;
|
||||
corridor: {
|
||||
low: number | null;
|
||||
high: number | null;
|
||||
median: number | null;
|
||||
currentPE: number | null;
|
||||
fairValue1y: number | null;
|
||||
impliedUpside1y: number | null;
|
||||
pePercentile1y: number | null;
|
||||
} | null;
|
||||
}>("confluence.corridorSnapshot", { symbol }),
|
||||
corridorWatchlist: () =>
|
||||
trpcQuery<{ symbols: string[] }>("confluence.corridorWatchlist"),
|
||||
corridorWatchlistAdd: (symbol: string) =>
|
||||
trpcMutate<{ symbols: string[] }>("confluence.corridorWatchlistAdd", { symbol }),
|
||||
corridorWatchlistRemove: (symbol: string) =>
|
||||
trpcMutate<{ symbols: string[] }>("confluence.corridorWatchlistRemove", { symbol }),
|
||||
corridorBacktest: () =>
|
||||
trpcQuery<{
|
||||
rows: Array<{
|
||||
id: string;
|
||||
articleDate: string;
|
||||
articleId: string;
|
||||
rankingType: string;
|
||||
topSymbols: string[];
|
||||
bottomSymbols: string[];
|
||||
topAvgReturn: number | null;
|
||||
bottomAvgReturn: number | null;
|
||||
spread: number | null;
|
||||
isWin: boolean;
|
||||
horizonDays: number;
|
||||
gradedAt: string;
|
||||
}>;
|
||||
aggregate: {
|
||||
entries: number;
|
||||
resolved: number;
|
||||
resolved1y: number;
|
||||
resolved90d: number;
|
||||
hitRate: number | null;
|
||||
avgSpread: number | null;
|
||||
bestSpread: number | null;
|
||||
worstSpread: number | null;
|
||||
avgTopReturn: number | null;
|
||||
avgBottomReturn: number | null;
|
||||
};
|
||||
}>("confluence.corridorBacktest"),
|
||||
corridorBacktestRun: () =>
|
||||
trpcMutate<{ grades: number; resolved: number; aggregate: Record<string, unknown> }>("confluence.corridorBacktestRun", {}),
|
||||
runEvaluationNow: (opts?: { symbol?: string }) =>
|
||||
trpcMutate<Record<string, unknown>>("confluence.runEvaluationNow", opts ?? {}),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ export type NavItemId =
|
||||
| "filings"
|
||||
| "options"
|
||||
| "dealer-flow"
|
||||
| "confluence"
|
||||
| "alerts"
|
||||
| "settings"
|
||||
| "admin"
|
||||
@@ -79,6 +80,7 @@ export const NAV_DENSITY: Record<NavItemId, DensityGate> = {
|
||||
filings: "full",
|
||||
options: "full",
|
||||
"dealer-flow": "focused",
|
||||
confluence: "standard",
|
||||
alerts: "focused",
|
||||
settings: "focused",
|
||||
admin: "focused",
|
||||
|
||||
Reference in New Issue
Block a user