Skip to content

Commit

Permalink
Fix minification pool
Browse files Browse the repository at this point in the history
  • Loading branch information
atjn committed Jan 26, 2023
1 parent a8ec4f1 commit 0992a95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions src/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,14 @@ async function minify(type){
),
);

await asyncPool(
for await (const result of asyncPool(
concurrentThreads,
itemProcessingQueue,
async item => {
await processItem(item);
completedItemProcesses++;
bar(completedItemProcesses / itemProcessingQueue.length);
},
);
processItem,
)){
completedItemProcesses++;
bar(completedItemProcesses / itemProcessingQueue.length);
}

if(type === "images") vips.shutdown();

Expand Down

0 comments on commit 0992a95

Please sign in to comment.