Sha256: a5d4afe60f05e34ac4776d89ba5c443d57184a10a3f1faee1db7efeb29990f59

Contents?: true

Size: 550 Bytes

Versions: 3

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

require 'securerandom'

require 'rack'
require 'rack/server'

require 'puma_worker_killer'

PumaWorkerKiller.config do |config|
  config.ram       = Integer(ENV['PUMA_RAM'])       if ENV['PUMA_RAM']
  config.frequency = Integer(ENV['PUMA_FREQUENCY']) if ENV['PUMA_FREQUENCY']
end

puts "Frequency: #{PumaWorkerKiller.frequency}" if ENV['PUMA_FREQUENCY']

class HelloWorld
  def response(_env)
    [200, {}, ['Hello World']]
  end
end

class HelloWorldApp
  def self.call(env)
    HelloWorld.new.response(env)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puma_worker_killer-0.3.1 test/fixtures/fixture_helper.rb
puma_worker_killer-0.3.0 test/fixtures/fixture_helper.rb
puma_worker_killer-0.2.0 test/fixtures/fixture_helper.rb