Sha256: 2e60e82d9405236985bc8c21e46c86d947617ee17bcda079e0f53c3ae6bb1476

Contents?: true

Size: 1.37 KB

Versions: 12

Compression:

Stored size: 1.37 KB

Contents

# Sample verbose configuration file for Pitchfork

# Use at least one worker per core if you're on a dedicated server,
# more will usually help for _short_ waits on databases/caches.
worker_processes 4

# listen on both a Unix domain socket and a TCP port,
# we use a shorter backlog for quicker failover when busy
listen "/path/to/.pitchfork.sock", :backlog => 64
listen 8080, :tcp_nopush => true

# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 30

# Enable this flag to have pitchfork test client connections by writing the
# beginning of the HTTP headers before calling the application.  This
# prevents calling the application for connections that have disconnected
# while queued.  This is only guaranteed to detect clients on the same
# host pitchfork runs on, and unlikely to detect disconnects even on a
# fast LAN.
check_client_connection false

# local variable to guard against running a hook multiple times
run_once = true

after_mold_fork do |server, mold|
  # Occasionally, it may be necessary to run non-idempotent code in the
  # master before forking.  Keep in mind the above disconnect! example
  # is idempotent and does not need a guard.
  if run_once
    # do_something_once_here ...
    run_once = false # prevent from firing again
  end

end

after_worker_fork do |server, worker|
  # You may want to check and restart any shared sockets/descriptors
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pitchfork-0.12.0 examples/pitchfork.conf.rb
pitchfork-0.11.1 examples/pitchfork.conf.rb
pitchfork-0.11.0 examples/pitchfork.conf.rb
pitchfork-0.10.0 examples/pitchfork.conf.rb
pitchfork-0.9.0 examples/pitchfork.conf.rb
pitchfork-0.8.0 examples/pitchfork.conf.rb
pitchfork-0.7.0 examples/pitchfork.conf.rb
pitchfork-0.6.0 examples/pitchfork.conf.rb
pitchfork-0.5.0 examples/pitchfork.conf.rb
pitchfork-0.4.1 examples/pitchfork.conf.rb
pitchfork-0.4.0 examples/pitchfork.conf.rb
pitchfork-0.3.0 examples/pitchfork.conf.rb