Skip to content

Commit

Permalink
Rack-timeout with a timeout of 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Mar 21, 2016
1 parent 743cdc8 commit c31185b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source "https://rubygems.org"
# source "https://bundler-api-staging.herokuapp.com"

ruby File.read(File.expand_path('../.ruby-version', __FILE__)).strip

Expand All @@ -15,6 +16,7 @@ gem 'metriks-middleware'
gem 'pg'
gem 'puma'
gem 'puma_worker_killer'
gem 'rack-timeout', '0.4.0.beta.1', github: 'indirect/rack-timeout'
gem 'rake'
gem 'dalli', github: 'indirect/dalli'
gem 'redis'
Expand Down
14 changes: 12 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ GIT
metriks-librato_metrics (1.0.3)
metriks (>= 0.9.9.6)

GIT
remote: https://github.com/indirect/rack-timeout.git
revision: 96c78a76bb6f1b45990e40ccd26df652e6202db8
specs:
rack-timeout (0.4.0.beta.1)

GEM
remote: https://rubygems.org/
remote: https://bundler-api-staging.herokuapp.com/
specs:
aggregate (0.2.2)
appsignal (0.11.6.beta.0)
Expand Down Expand Up @@ -123,6 +129,7 @@ DEPENDENCIES
puma
puma_worker_killer
rack-test
rack-timeout (= 0.4.0.beta.1)!
rake
redis
rspec-core
Expand All @@ -133,5 +140,8 @@ DEPENDENCIES
sequel_pg
sinatra

RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.12.0.pre.1
1.12.0.rc
3 changes: 3 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'bundler_api/web'
require 'rack-timeout'

use Rack::Timeout, service_timeout: 1
use Rack::Deflater
run BundlerApi::Web.new

0 comments on commit c31185b

Please sign in to comment.