File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,10 +87,13 @@ export const connectAllTransactionsToPricesWorker = async (queueName: string): P
8787 queueName ,
8888 async ( job ) => {
8989 console . log ( `job ${ job . id as string } : connecting prices to transactions...` )
90+ const noPricesTxs = await transactionService . fetchAllTransactionsWithNoPrices ( )
91+ const wrongNumberOfPricesTxs = await transactionService . fetchAllTransactionsWithIrregularPrices ( )
9092 const txs = [
91- ...await transactionService . fetchAllTransactionsWithNoPrices ( ) ,
92- ...await transactionService . fetchAllTransactionsWithIrregularPrices ( )
93+ ...noPricesTxs ,
94+ ...wrongNumberOfPricesTxs
9395 ]
96+ console . log ( `found ${ noPricesTxs . length } with no prices and ${ wrongNumberOfPricesTxs . length } txs with wrong number of prices` )
9497 void await transactionService . connectTransactionsListToPrices ( txs )
9598 } ,
9699 {
Original file line number Diff line number Diff line change @@ -314,9 +314,9 @@ export async function connectTransactionsListToPrices (txList: Transaction[]): P
314314 }
315315 }
316316 } )
317- for ( const tx of txList ) {
317+ await Promise . all ( txList . map ( async tx =>
318318 await connectTransactionToPrices ( tx , prisma , false )
319- }
319+ ) )
320320 } )
321321}
322322
You can’t perform that action at this time.
0 commit comments