aboutsummaryrefslogtreecommitdiffstats
path: root/config/unicorn.rb
diff options
context:
space:
mode:
authorrhenium <rhenium@rhe.jp>2015-03-18 22:06:27 +0900
committerrhenium <rhenium@rhe.jp>2015-03-18 22:06:36 +0900
commit181d786f2484e8078037495a17633427babef6da (patch)
tree3fc49c4a840ef4114c7b85852a0973d025012416 /config/unicorn.rb
parent8e96277bb5a819a001a4fdd2ba71331fc484cf3d (diff)
downloadaclog-181d786f2484e8078037495a17633427babef6da.tar.gz
[WIP] web: use puma instead of unicorn
Diffstat (limited to 'config/unicorn.rb')
-rw-r--r--config/unicorn.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/config/unicorn.rb b/config/unicorn.rb
deleted file mode 100644
index fc20b0b..0000000
--- a/config/unicorn.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-_rails_root = File.expand_path("../../", __FILE__)
-
-worker_processes 8
-working_directory _rails_root
-
-pid File.join(_rails_root, "tmp", "pids", "unicorn.pid").to_s
-
-listen File.join(_rails_root, "tmp", "sockets", "unicorn.sock"), backlog: 64
-listen 8080
-
-_log_file = File.join(_rails_root, "log", "unicorn.log")
-stderr_path _log_file
-stdout_path _log_file
-
-preload_app true
-GC.respond_to?(:copy_on_write_friendly=) and
- GC.copy_on_write_friendly = true
-
-before_fork do |server, worker|
- defined?(ActiveRecord::Base) and
- ActiveRecord::Base.connection.disconnect!
-
- old_pid = "#{server.config[:pid]}.oldbin"
- if old_pid != server.pid
- begin
- sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
- Process.kill(sig, File.read(old_pid).to_i)
- rescue Errno::ENOENT, Errno::ESRCH
- end
- end
-end
-
-after_fork do |server, worker|
- defined?(ActiveRecord::Base) and
- ActiveRecord::Base.establish_connection
-end