2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/config/initializers/001-redis.rb

15 lines
363 B
Ruby
Raw Normal View History

if Rails.env.development? && ENV['DISCOURSE_FLUSH_REDIS']
puts "Flushing redis (development mode)"
$redis.flushall
end
if defined?(PhusionPassenger)
2017-07-28 10:20:09 +09:00
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
2017-07-28 10:20:09 +09:00
end
end