Skip to content

Commit

Permalink
Merge pull request #72 from pelias/patch
Browse files Browse the repository at this point in the history
server: fix for CPU detection
  • Loading branch information
missinglink authored Oct 25, 2017
2 parents 4379dcf + fd9c314 commit 007ffdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const logger = require('pelias-logger').get('placeholder');

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

// optionally override port/host using env var
var PORT = process.env.PORT || 3000;
Expand Down

0 comments on commit 007ffdd

Please sign in to comment.