Fixed #580 , exception when using phusion passenger, thanks yarishima42
This commit is contained in:
parent
894f112b75
commit
5a90cfd680
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ MongoMapper.connect ::Rails.env
|
||||||
|
|
||||||
if defined?(PhusionPassenger)
|
if defined?(PhusionPassenger)
|
||||||
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
||||||
MongoMapper.connection.connect_to_master if forked
|
MongoMapper.connection.connect if forked
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue