mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 20:36:39 +08:00
parent
9c9fa4537c
commit
45fe5dc793
|
@ -195,7 +195,7 @@ before_fork do |server, worker|
|
||||||
sleep 10
|
sleep 10
|
||||||
force_kill_rogue_sidekiq
|
force_kill_rogue_sidekiq
|
||||||
end
|
end
|
||||||
$redis.client.disconnect
|
$redis._client.disconnect
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ before_fork do |server, worker|
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.connection.disconnect!
|
ActiveRecord::Base.connection.disconnect!
|
||||||
$redis.client.disconnect
|
$redis._client.disconnect
|
||||||
|
|
||||||
# Throttle the master from forking too quickly by sleeping. Due
|
# Throttle the master from forking too quickly by sleeping. Due
|
||||||
# to the implementation of standard Unix signal handlers, this
|
# to the implementation of standard Unix signal handlers, this
|
||||||
|
|
|
@ -432,7 +432,7 @@ module Discourse
|
||||||
RailsMultisite::ConnectionManagement.establish_connection(db: current_db)
|
RailsMultisite::ConnectionManagement.establish_connection(db: current_db)
|
||||||
MessageBus.after_fork
|
MessageBus.after_fork
|
||||||
SiteSetting.after_fork
|
SiteSetting.after_fork
|
||||||
$redis.client.reconnect
|
$redis._client.reconnect
|
||||||
Rails.cache.reconnect
|
Rails.cache.reconnect
|
||||||
Logster.store.redis.reconnect
|
Logster.store.redis.reconnect
|
||||||
# shuts down all connections in the pool
|
# shuts down all connections in the pool
|
||||||
|
|
|
@ -229,7 +229,7 @@ class DiscourseRedis
|
||||||
end
|
end
|
||||||
|
|
||||||
def reconnect
|
def reconnect
|
||||||
@redis.client.reconnect
|
@redis._client.reconnect
|
||||||
end
|
end
|
||||||
|
|
||||||
def namespace_key(key)
|
def namespace_key(key)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user