mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
forking in passenger was bust, message bus subscriptions would stop working after fork
This commit is contained in:
parent
978bc0ca4e
commit
8b69ee26ff
4 changed files with 4 additions and 3 deletions
|
@ -16,7 +16,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: https://github.com/SamSaffron/message_bus
|
||||
revision: f55b41653d0c149938ebb803a97d946e5ae80439
|
||||
revision: 9c16e7ebaafaf2a3933a84fa1c517c0eba44b052
|
||||
specs:
|
||||
message_bus (0.0.2)
|
||||
eventmachine
|
||||
|
|
|
@ -13,6 +13,7 @@ if defined?(PhusionPassenger)
|
|||
# We're in smart spawning mode.
|
||||
$redis = DiscourseRedis.new
|
||||
Discourse::Application.config.cache_store.reconnect
|
||||
MessageBus.after_fork
|
||||
else
|
||||
# We're in conservative spawning mode. We don't need to do anything.
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# spring binstub rspec
|
||||
Spring.after_fork do
|
||||
$redis.client.reconnect
|
||||
MessageBus.reliable_pub_sub.pub_redis.client.reconnect
|
||||
Rails.cache.reconnect
|
||||
MessageBus.after_fork
|
||||
end
|
||||
Spring::Commands::Rake.environment_matchers["spec"] = "test"
|
||||
|
|
|
@ -112,8 +112,8 @@ end
|
|||
Spork.each_run do
|
||||
# This code will be run each time you run your specs.
|
||||
$redis.client.reconnect
|
||||
MessageBus.reliable_pub_sub.pub_redis.client.reconnect
|
||||
Rails.cache.reconnect
|
||||
MessageBus.after_fork
|
||||
end
|
||||
|
||||
def build(*args)
|
||||
|
|
Loading…
Reference in a new issue