Skip to content

Commit

Permalink
bigger batch
Browse files Browse the repository at this point in the history
  • Loading branch information
themarolt committed Oct 8, 2024
1 parent 53a7d0b commit f136b35
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ LIMIT 5000;
let conversationsCreated = 0
const toCreate = Object.values(conversationsToCreate)
if (toCreate.length > 0) {
for (const batch of partition(toCreate, 1)) {
for (const batch of partition(toCreate, 100)) {
try {
const results = await insertConversations(batch)
conversationsCreated += results.length
Expand Down Expand Up @@ -173,7 +173,7 @@ LIMIT 5000;
}

if (toUpdate.length > 0) {
for (const batch of partition(toUpdate, 1)) {
for (const batch of partition(toUpdate, 100)) {
try {
const results = await insertActivities(batch, true)
activitiesAddedToConversations += results.length
Expand Down

0 comments on commit f136b35

Please sign in to comment.