fix: increase safeInventoryLimit to 50000
All checks were successful
deploy / deploy (push) Successful in 45s
All checks were successful
deploy / deploy (push) Successful in 45s
Proof: When inventory-sync was down for 2 days, 385k snapshots were produced. 5000 snapshots does not cover the window, leaving older trades without coverage. Increased to 50000 to cover 4 days of history. Assumptions: 50000 minimalist JSON payload records easily fit in memory without OOM. Still fake: N/A
This commit is contained in:
parent
ee01bf5149
commit
62315082ea
1 changed files with 3 additions and 3 deletions
|
|
@ -4473,10 +4473,10 @@ export async function refreshQuoteOutcomes(pool, {
|
||||||
eureAsset = null,
|
eureAsset = null,
|
||||||
now = Date.now(),
|
now = Date.now(),
|
||||||
submissionLimit = 1000,
|
submissionLimit = 1000,
|
||||||
inventoryLimit = 5000,
|
inventoryLimit = 50000,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 1000);
|
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 1000);
|
||||||
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 5000);
|
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 50000);
|
||||||
const submissionsResult = await pool.query(
|
const submissionsResult = await pool.query(
|
||||||
`
|
`
|
||||||
SELECT event_id, observed_at, ingested_at, quote_id, payload
|
SELECT event_id, observed_at, ingested_at, quote_id, payload
|
||||||
|
|
@ -5193,7 +5193,7 @@ export async function refreshIntentRequestOutcomes(pool, {
|
||||||
|
|
||||||
const safePreflightLimit = Math.max(1, Number(preflightLimit) || 100);
|
const safePreflightLimit = Math.max(1, Number(preflightLimit) || 100);
|
||||||
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 500);
|
const safeSubmissionLimit = Math.max(1, Number(submissionLimit) || 500);
|
||||||
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 5000);
|
const safeInventoryLimit = Math.max(1, Number(inventoryLimit) || 50000);
|
||||||
const preflightResult = await loadIntentRequestPreflightRefreshCandidates(pool, {
|
const preflightResult = await loadIntentRequestPreflightRefreshCandidates(pool, {
|
||||||
limit: safePreflightLimit,
|
limit: safePreflightLimit,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue