We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a9a467 commit 20b9df8Copy full SHA for 20b9df8
config/unicorn.rb
@@ -11,8 +11,6 @@
11
GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true
12
13
before_fork do |server, worker|
14
- defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
15
-
16
# kills old children after zero downtime deploy
17
old_pid = "#{server.config[:pid]}.oldbin"
18
if old_pid != server.pid
@@ -25,9 +23,3 @@
25
23
26
24
sleep 1
27
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