use appconfig instead of config
This commit is contained in:
parent
55d39521c4
commit
7042b43799
4 changed files with 5 additions and 8 deletions
|
|
@ -96,6 +96,9 @@ default:
|
||||||
# It is false by default in development and test.
|
# It is false by default in development and test.
|
||||||
enable_splunk_logging: true
|
enable_splunk_logging: true
|
||||||
|
|
||||||
|
# Process jobs in process?
|
||||||
|
single_process_mode: true
|
||||||
|
|
||||||
development:
|
development:
|
||||||
enable_splunk_logging: false
|
enable_splunk_logging: false
|
||||||
|
|
||||||
|
|
@ -105,3 +108,4 @@ test:
|
||||||
enable_splunk_logging: false
|
enable_splunk_logging: false
|
||||||
|
|
||||||
production:
|
production:
|
||||||
|
single_process_mode: false
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,6 @@ Diaspora::Application.configure do
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
#config.threadsafe!
|
#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
|
# 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
|
# 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
|
# 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
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,6 @@ Diaspora::Application.configure do
|
||||||
# the I18n.default_locale when a translation can not be found)
|
# the I18n.default_locale when a translation can not be found)
|
||||||
config.i18n.fallbacks = true
|
config.i18n.fallbacks = true
|
||||||
config.threadsafe!
|
config.threadsafe!
|
||||||
|
|
||||||
# Process jobs in process?
|
|
||||||
#config.work_in_process = false
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sacrifice readability for a 10% performance boost
|
# Sacrifice readability for a 10% performance boost
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Dir[File.join(Rails.root, 'app', 'models', 'jobs', '*.rb')].each { |file| requir
|
||||||
require 'resque'
|
require 'resque'
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Diaspora::Application.config.work_in_process
|
if AppConfig[:single_process_mode]
|
||||||
if Rails.env == 'production'
|
if Rails.env == 'production'
|
||||||
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue