Skip to content

Commit

Permalink
userpnlsettler: dont quit on throw
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Dec 7, 2023
1 parent aa1072d commit dd2d42e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/bots/userPnlSettler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,16 @@ export class UserPnlSettlerBot implements Bot {
}
}
}
const txs = await Promise.all(settlePnlPromises);
for (const tx of txs) {
logger.info(`Settle PNL tx: ${JSON.stringify(tx)}`);
try {
const txs = await Promise.all(settlePnlPromises);
for (const tx of txs) {
logger.info(`Settle PNL tx: ${JSON.stringify(tx)}`);
}
} catch (e) {
console.error(
`Caught error settling users for ${params.marketIndex}: ${marketStr}`
);
console.error(e);
}
}
} catch (err) {
Expand Down

0 comments on commit dd2d42e

Please sign in to comment.