discourse/config/initializers/099-unicorn.rb
Sam c04bcf8655 PERF: move message bus to the front of the middleware stack
Organise all initializers so they are properly ordered and use the same naming scheme
2015-12-07 14:51:24 +11:00

12 lines
320 B
Ruby

require_dependency 'scheduler/defer'
if defined? Unicorn::HttpServer
ObjectSpace.each_object(Unicorn::HttpServer) do |s|
s.extend(Scheduler::Defer::Unicorn)
end
if ENV['UNICORN_ENABLE_OOBGC'] == '1' && RUBY_VERSION < "2.2.0"
require 'middleware/unicorn_oobgc'
Middleware::UnicornOobgc.init
end
end