Is there an existing issue for this?
Use case description
In proot environment and in other cases where conserving CPU is a priority, one sometimes needs to have control over the concurrency value.
Example: Iran into an issue today when using the serverless framework and trying to deploy and application.
It seems that os.cpus() returns an empty list when running in proot. Which eventually triggered p-map to throw an exception
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
}
When called from zip-service.js
return pMap(normalizedFiles, this.getFileContentAndStat.bind(this), {
concurrency: os.cpus().length
})
I've managed to fix this for myself by setting the concurrency value manually in sf-core.js but thought it would be handy even in the case of CI/CD
Therefore, I opened this PR
#13044
Proposed solution (optional)
No response
Is there an existing issue for this?
Use case description
In proot environment and in other cases where conserving CPU is a priority, one sometimes needs to have control over the concurrency value.
Example: Iran into an issue today when using the serverless framework and trying to deploy and application.
It seems that os.cpus() returns an empty list when running in proot. Which eventually triggered p-map to throw an exception
When called from zip-service.js
I've managed to fix this for myself by setting the concurrency value manually in sf-core.js but thought it would be handy even in the case of CI/CD
Therefore, I opened this PR
#13044
Proposed solution (optional)
No response