Skip to content

Instantly share code, notes, and snippets.

@johnnaegle
Created May 27, 2016 14:08
Show Gist options
  • Save johnnaegle/1b9b042867f3869d84c5440fb7cb45c0 to your computer and use it in GitHub Desktop.
Save johnnaegle/1b9b042867f3869d84c5440fb7cb45c0 to your computer and use it in GitHub Desktop.
restart puma before a deploy to free memory
before 'deploy:started', "puma:phased-restart"
after 'deploy:started', 'reenable_phased_restart'
task :reenable_phased_restart do
::Rake.application['puma:phased-restart'].reenable
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment