Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
feat(appserver): support rails restart command on puma.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzia authored and ajgon committed Jun 15, 2018
1 parent bf11241 commit bb04fb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/unit/recipes/configure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,9 @@
expect(chef_run)
.to render_file("/srv/www/#{aws_opsworks_app['shortname']}/shared/config/puma.rb")
.with_content('worker_timeout 60')
expect(chef_run)
.to render_file("/srv/www/#{aws_opsworks_app['shortname']}/shared/config/puma.rb")
.with_content('plugin :tmp_restart')
end

it 'creates proper puma.service file' do
Expand Down
3 changes: 3 additions & 0 deletions templates/default/puma.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ end
# Change the default timeout of worker startup
# The default is 60
worker_timeout <%= @out[:timeout] %>

# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart if Gem.loaded_specs['puma'].version >= Gem::Version.new('3.0')

0 comments on commit bb04fb4

Please sign in to comment.