Skip to content

Commit 007ffdd

Browse files
authored
Merge pull request #72 from pelias/patch
server: fix for CPU detection
2 parents 4379dcf + fd9c314 commit 007ffdd

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)