Sha256: 6f49c61f9a895e2b2e4bf7df3eab7330223c3e9785f5d0de12e019f57729cdfe

Contents?: true

Size: 449 Bytes

Versions: 21

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

module NeetoCommonsBackend
  module Initializers
    class << self
      def rack_timeout
        # service_timeout = 0 or false disables rack-timeout
        # service_timeout = 30 is the maximum timeout supported by Heroku
        service_timeout = ["development", "test"].include?(Rails.env.to_s) ? 0 : 30

        Rails.application.config.middleware.use Rack::Timeout, service_timeout:
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.108 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.107 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.106 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.105 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.104 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.103 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.102 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.101 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.100 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.99 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.98 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.97 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.96 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.95 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.94 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.93 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.92 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.91 lib/neeto_commons_backend/initializers/rack_timeout.rb
neeto-commons-backend-1.0.90 lib/neeto_commons_backend/initializers/rack_timeout.rb