Skip to content

Instantly share code, notes, and snippets.

@vertis
Created October 1, 2010 03:33
Show Gist options
  • Select an option

  • Save vertis/605682 to your computer and use it in GitHub Desktop.

Select an option

Save vertis/605682 to your computer and use it in GitHub Desktop.
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
MyModel.connection.reconnect!
else
# We're in conservative spawning mode. We don't need to do anything.
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment