Skip to content

Commit

Permalink
enable puma worker rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Mar 21, 2016
1 parent 5167e55 commit 743cdc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem 'metriks-librato_metrics', github: 'indirect/metriks-librato_metrics'
gem 'metriks-middleware'
gem 'pg'
gem 'puma'
gem 'puma_worker_killer'
gem 'rake'
gem 'dalli', github: 'indirect/dalli'
gem 'redis'
Expand Down
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ GEM
multipart-post (>= 1.2, < 3)
foreman (0.78.0)
thor (~> 0.19.1)
get_process_mem (0.2.0)
hitimes (1.2.3)
json (1.8.3)
librato-metrics (1.6.0)
Expand Down Expand Up @@ -61,6 +62,9 @@ GEM
byebug (~> 8.0)
pry (~> 0.10)
puma (3.0.0)
puma_worker_killer (0.0.5)
get_process_mem (~> 0.2)
puma (>= 2.7, < 4)
rack (1.6.4)
rack-protection (1.5.3)
rack
Expand Down Expand Up @@ -117,6 +121,7 @@ DEPENDENCIES
pg
pry-byebug
puma
puma_worker_killer
rack-test
rake
redis
Expand All @@ -128,8 +133,5 @@ DEPENDENCIES
sequel_pg
sinatra

RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.12.0.pre.1
3 changes: 3 additions & 0 deletions puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
require 'bundler_api/metriks'
BundlerApi::Metriks.start

require 'puma_worker_killer'
PumaWorkerKiller.enable_rolling_restart

on_worker_boot do |index|
BundlerApi::Metriks.start(index)
end

0 comments on commit 743cdc8

Please sign in to comment.