Reduced number of workers
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Shahan Nedadahandeh 2022-06-01 18:57:52 -07:00
parent e336bed2aa
commit 6f6510a5ee
Signed by: snedadah
GPG Key ID: 8638C7F917385B01
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ export async function optimizeImages() {
const imagePaths = await getFilePathsInDirectory(SOURCE_DIRECTORY);
await fse.emptyDir(DESTINATION_DIRECTORY);
// maximum number of workers is 8 in order to avoid running out of memory
const numberOfWorkers = Math.min(cpus().length, 8);
// maximum number of workers is 4 in order to avoid running out of memory
const numberOfWorkers = Math.min(cpus().length, 4);
const imagePool = new ImagePool(numberOfWorkers);
await Promise.all(