2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

avoid static method so we can easily inherit off this class

This commit is contained in:
Sam 2015-05-06 09:53:10 +10:00
parent 2139a6208b
commit b7e7da766d
2 changed files with 10 additions and 4 deletions

View file

@ -296,6 +296,7 @@ module Discourse
# after fork, otherwise Discourse will be
# in a bad state
def self.after_fork
# note: all this reconnecting may no longer be needed per https://github.com/redis/redis-rb/pull/414
current_db = RailsMultisite::ConnectionManagement.current_db
RailsMultisite::ConnectionManagement.establish_connection(db: current_db)
MessageBus.after_fork