Skip to content

Commit

Permalink
Decrease chunk length
Browse files Browse the repository at this point in the history
  • Loading branch information
nkalupahana committed Mar 20, 2024
1 parent 99db5b4 commit f1dfa60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scheduled-services/src/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export const logReminder = async (req: Request, res: Response) => {
}

if (messages.length > 0) {
const chunkedMessages = _.chunk(messages, 500);
const chunkedAssociations = _.chunk(userMessageAssociation, 500);
const chunkedMessages = _.chunk(messages, 100);
const chunkedAssociations = _.chunk(userMessageAssociation, 100);
for (let i = 0; i < chunkedMessages.length; ++i) {
const messagingResult = await getMessaging().sendAll(chunkedMessages[i]);
console.log(JSON.stringify(messagingResult));
Expand Down

0 comments on commit f1dfa60

Please sign in to comment.