Skip to content

Commit

Permalink
Replace thin with puma
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Macneil committed Sep 7, 2014
1 parent dac042a commit 0009761
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gem 'sidekiq'
gem 'sidekiq-unique-jobs'
gem 'sinatra', require: 'sinatra/base'
gem 'sinatra-contrib'
gem 'thin'
gem 'puma'
gem 'faye-websocket'
gem 'bugsnag-em'

Expand Down
9 changes: 3 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ GEM
celluloid (0.15.2)
timers (~> 1.1.0)
connection_pool (2.0.0)
daemons (1.1.9)
database_cleaner (1.3.0)
diff-lcs (1.2.5)
dotenv (0.11.1)
Expand All @@ -41,6 +40,8 @@ GEM
multi_json (1.10.1)
multi_xml (0.5.5)
pg (0.17.1)
puma (2.9.0)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-protection (1.5.3)
rack
Expand Down Expand Up @@ -85,10 +86,6 @@ GEM
rack-test
sinatra (~> 1.4.0)
tilt (~> 1.3)
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
tilt (1.4.1)
timers (1.1.0)
Expand All @@ -106,6 +103,7 @@ DEPENDENCIES
ffi
foreman
pg
puma
rack-test
rake
rspec
Expand All @@ -115,4 +113,3 @@ DEPENDENCIES
sidekiq-unique-jobs
sinatra
sinatra-contrib
thin
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
web: bundle exec thin --port $PORT start
web: bundle exec puma
block_worker: bundle exec sidekiq -q blocks -c 1 -r ./config/environment.rb
transaction_worker: bundle exec sidekiq -q transactions -c 1 -r ./config/environment.rb
peer_manager: bundle exec ruby bin/peer_manager.rb
2 changes: 0 additions & 2 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ require "toshi/api"
require "toshi/websocket_server"
require 'sidekiq/web'

Faye::WebSocket.load_adapter('thin')

use Rack::CommonLogger
use Bugsnag::Rack

Expand Down
3 changes: 3 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
workers Integer(ENV['PUMA_WORKERS'] || 3)
threads Integer(ENV['PUMA_MIN_THREADS'] || 1), Integer(ENV['PUMA_MAX_THREADS'] || 16)
port ENV['PORT'] || 5000

0 comments on commit 0009761

Please sign in to comment.