use appconfig instead of config

This commit is contained in:
danielgrippi 2011-05-16 18:54:50 -07:00
parent 55d39521c4
commit 7042b43799
4 changed files with 5 additions and 8 deletions

View file

@ -96,6 +96,9 @@ default:
# It is false by default in development and test.
enable_splunk_logging: true
# Process jobs in process?
single_process_mode: true
development:
enable_splunk_logging: false
@ -105,3 +108,4 @@ test:
enable_splunk_logging: false
production:
single_process_mode: false

View file

@ -23,9 +23,6 @@ Diaspora::Application.configure do
config.active_support.deprecation = :log
#config.threadsafe!
# Process jobs in process?
config.work_in_process = true
# Monkeypatch around the nasty "2.5MB exception page" issue, caused by very large environment vars
# This snippet via: http://stackoverflow.com/questions/3114993/exception-pages-in-development-mode-take-upwards-of-15-30-seconds-to-render-why
# Relevant Rails ticket: https://rails.lighthouseapp.com/projects/8994/tickets/5027-_request_and_responseerb-and-diagnosticserb-take-an-increasingly-long-time-to-render-in-development-with-multiple-show-tables-calls

View file

@ -47,10 +47,6 @@ Diaspora::Application.configure do
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
config.threadsafe!
# Process jobs in process?
#config.work_in_process = false
end
# Sacrifice readability for a 10% performance boost

View file

@ -4,7 +4,7 @@ Dir[File.join(Rails.root, 'app', 'models', 'jobs', '*.rb')].each { |file| requir
require 'resque'
begin
if Diaspora::Application.config.work_in_process
if AppConfig[:single_process_mode]
if Rails.env == 'production'
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
end