Sha256: 3685274306689e5295e6d01890faaa72e18a8339618d6f065bddaccd248a9b2d

Contents?: true

Size: 671 Bytes

Versions: 8

Compression:

Stored size: 671 Bytes

Contents

def thin(proxy, port)
  name = "thin-#{port}"

  opts = [
    "-l thins.log",
    "-p #{port}",
    "-P #{name}.pid",
    "-d",
    "-R thin.ru",
    "--tag #{proxy.app.name}.#{proxy.name}",
    "-t 60",
    "-e #{proxy.env["RAILS_ENV"]}",
    "-c #{proxy.working_dir}",
    "-a 127.0.0.1"
  ]

  proxy.process(name) do
    pid_file "#{name}.pid"

    start_command "#{BUNDLE} exec thin start #{opts * ' '}"
    stop_signals [:QUIT, 2.seconds, :TERM, 1.seconds, :KILL]

    stdall "thin.stdall.log"

    checks :http, :url => "http://127.0.0.1:#{port}/hello", :pattern => /World/, 
                  :every => 5.seconds, :times => [2, 3], :timeout => 1.second
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
reel-eye-0.3.2 examples/process_thin.rb
eye-0.3.2 examples/process_thin.rb
reel-eye-0.3.1 examples/process_thin.rb
eye-0.3.1 examples/process_thin.rb
eye-0.3 examples/process_thin.rb
eye-0.2.4 examples/process_thin.rb
eye-0.2.3 examples/process_thin.rb
eye-0.2.2 examples/process_thin.rb