Skip to content

Commit

Permalink
bake charts async
Browse files Browse the repository at this point in the history
  • Loading branch information
Marigold committed Feb 16, 2024
1 parent 303228e commit 1d911b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions baker/GrapherBaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,12 @@ export const bakeAllChangedGrapherPagesVariablesPngSvgAndDeleteRemovedGraphers =
)

if (MAX_NUM_BAKE_PROCESSES === 1) {
for (const job of jobs) {
await bakeSingleGrapherChart(job)
progressBar.tick({ name: `slug ${job.slug}` })
}
await Promise.all(
jobs.map(async (job) => {
await bakeSingleGrapherChart(job)
progressBar.tick({ name: `slug ${job.slug}` })
})
)
} else {
const poolOptions = {
minWorkers: 2,
Expand Down

0 comments on commit 1d911b6

Please sign in to comment.