module Slowpoke

Constants

ENV_KEY
VERSION

Public Class Methods

kill() click to toggle source
# File lib/slowpoke.rb, line 13
def self.kill
  if defined?(::PhusionPassenger)
    `passenger-config detach-process #{Process.pid}`
  elsif defined?(::Puma)
    Process.kill("TERM", Process.pid)
  else
    Process.kill("QUIT", Process.pid)
  end
end
on_timeout(&block) click to toggle source
# File lib/slowpoke.rb, line 23
def self.on_timeout(&block)
  if block_given?
    @on_timeout = block
  else
    @on_timeout
  end
end