1234567891011121314151617181920212223242526272829 |
- worker_processes 4
- timeout 30
- stderr_path 'log/unicorn_error.log'
- stdout_path 'log/unicorn_access.log'
- pid 'tmp/pids/unicorn.pid'
- before_fork do |server, _worker|
-
-
-
-
-
-
-
-
-
-
- old_pid = 'tmp/pids/unicorn.pid.oldbin'
- if File.exist?(old_pid) && server.pid != old_pid
- begin
- Process.kill('QUIT', File.read(old_pid).to_i)
- rescue Errno::ENOENT, Errno::ESRCH
- logger.info 'Unicorn master already killed. Someone else did our job for us.'
- end
- end
- end
|