Run after_fork hooks correctly on Phusion Passenger

This commit is contained in:
Hongli Lai (Phusion) 2014-12-22 15:59:07 +01:00
parent 5045d8677c
commit 3afda54d22
No known key found for this signature in database
GPG Key ID: 2AF96EB85EF4DA0D
1 changed files with 8 additions and 0 deletions

View File

@ -167,3 +167,11 @@ module Discourse
end
end
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
Discourse.after_fork
end
end
end