Get processor count with ruby (on linux and mac)

closes #7830
This commit is contained in:
Benjamin Neff 2018-06-29 00:50:12 +02:00
parent c2fa0b1eba
commit ac868c9c06
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,7 @@
## Refactor
## Bug fixes
* Add compatibility with macOS to `script/configure_bundler` [#7830](https://github.com/diaspora/diaspora/pull/7830)
## Features

View file

@ -2,6 +2,7 @@
# frozen_string_literal: true
require_relative "../config/bundler_helper"
require "etc"
rails_env = BundlerHelper.rails_env
database = BundlerHelper.database
@ -13,7 +14,7 @@ def config(option)
system("#{File.join(__dir__, '../bin/bundle')} config --local #{option}")
end
config("jobs #{`nproc`}")
config("jobs #{Etc.nprocessors}")
config("with #{database}")
if rails_env == "production"