From be92f6710650df2ffe014ea65d1886594c7a81bc Mon Sep 17 00:00:00 2001 From: Will Liu Date: Wed, 15 May 2024 17:53:20 -0400 Subject: [PATCH] add slicing? --- indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts b/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts index eb9a7dd3f3..0a3148e59e 100644 --- a/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts +++ b/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts @@ -86,7 +86,7 @@ export async function getPnlTicksCreateObjects( const accountsToUpdate: string[] = [ ...getAccountsToUpdate(accountToLastUpdatedBlockTime, blockTime), ...newSubaccountIds, - ]; + ].slice(0, 200); stats.gauge( `${config.SERVICE_NAME}_get_ticks_accounts_to_update`, accountsToUpdate.length, @@ -172,6 +172,7 @@ export async function getPnlTicksCreateObjects( message: 'got subaccountTotalTransfersMap', }); + // Find open positions for subaccounts const openPerpetualPositions: SubaccountToPerpetualPositionsMap = await PerpetualPositionTable.findOpenPositionsForSubaccounts(