Sha256: 1fd3ff14b6ca216eeaae1f7312dcbea02d52c7c4fc605972a3641b3d60373620

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

# frozen_string_literal: true
# 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

4 entries across 4 versions & 1 rubygems

Version Path
pitchfork-0.16.0 examples/pitchfork.conf.rb
pitchfork-0.15.0 examples/pitchfork.conf.rb
pitchfork-0.14.0 examples/pitchfork.conf.rb
pitchfork-0.13.0 examples/pitchfork.conf.rb