mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-21 21:12:39 -05:00
15 lines
392 B
Ruby
15 lines
392 B
Ruby
if Rails.env.development? && ENV['DISCOURSE_FLUSH_REDIS']
|
|
puts "Flushing redis (development mode)"
|
|
$redis.flushall
|
|
end
|
|
|
|
if defined?(PhusionPassenger)
|
|
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
|
if forked
|
|
Discourse.after_fork
|
|
else
|
|
# We're in conservative spawning mode. We don't need to do anything.
|
|
end
|
|
end
|
|
end
|
|
|