Skip to content

Commit 20b9df8

Browse files
committed
Removing rails specific unicorn code
1 parent 1a9a467 commit 20b9df8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

config/unicorn.rb

-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true
1212

1313
before_fork do |server, worker|
14-
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
15-
1614
# kills old children after zero downtime deploy
1715
old_pid = "#{server.config[:pid]}.oldbin"
1816
if old_pid != server.pid
@@ -25,9 +23,3 @@
2523

2624
sleep 1
2725
end
28-
29-
after_fork do |server, worker|
30-
defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
31-
32-
defined?(Rails) and Rails.cache.respond_to?(:reconnect) and Rails.cache.reconnect
33-
end

0 commit comments

Comments
 (0)