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.
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue