Skip to content

Commit fd9c314

Browse files
committed
server: fix for CPU detection
1 parent 4379dcf commit fd9c314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const logger = require('pelias-logger').get('placeholder');
2828

2929
// select the amount of cpus we will use
3030
const envCpus = parseInt( process.env.CPUS, 10 );
31-
const cpus = Math.min( Math.max( envCpus, 1 ), os.cpus().length );
31+
const cpus = Math.min( Math.max( envCpus || Infinity, 1 ), os.cpus().length );
3232

3333
// optionally override port/host using env var
3434
var PORT = process.env.PORT || 3000;

0 commit comments

Comments
 (0)