Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonne Haß <me@mrzyx.de>2012-11-30 17:00:25 +0400
committerJonne Haß <me@mrzyx.de>2012-11-30 17:00:25 +0400
commit2a7a0b7b990b70835e336ddffe62bf0e4b198ac4 (patch)
tree8e2c85ff8d9ac6ebc1146d8332c80120028e0e76 /config/unicorn.rb
parent669dd87b11b9b989848f5f0393037c97fb53b1ef (diff)
* made number of unicorn worker processes configurable
* made configuration loader indepenent of rails * corrected mismatch between example and default config (server.db/server.database)
Diffstat (limited to 'config/unicorn.rb')
-rw-r--r--config/unicorn.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/unicorn.rb b/config/unicorn.rb
index 00d9b413c..456fecf95 100644
--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -1,10 +1,13 @@
rails_env = ENV['RAILS_ENV'] || 'development'
+require 'pathname'
+require Pathname.new(__FILE__).expand_path.dirname.join('load_config')
+
# Enable and set these to run the worker as a different user/group
#user = 'diaspora'
#group = 'diaspora'
-worker_processes 1
+worker_processes AppConfig.server.unicorn_worker.to_i
## Load the app before spawning workers
preload_app true