FIX: missing site id lookup causing message bus cross talk in multisite
This commit is contained in:
parent
2cc95af69b
commit
d8795a5345
|
@ -1,5 +1,10 @@
|
||||||
MessageBus.site_id_lookup do
|
MessageBus.site_id_lookup do |env=nil|
|
||||||
RailsMultisite::ConnectionManagement.current_db
|
if env
|
||||||
|
setup_message_bus_env(env)
|
||||||
|
env["__mb"][:site_id]
|
||||||
|
else
|
||||||
|
RailsMultisite::ConnectionManagement.current_db
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_message_bus_env(env)
|
def setup_message_bus_env(env)
|
||||||
|
@ -26,7 +31,8 @@ def setup_message_bus_env(env)
|
||||||
},
|
},
|
||||||
user_id: user_id,
|
user_id: user_id,
|
||||||
group_ids: group_ids,
|
group_ids: group_ids,
|
||||||
is_admin: is_admin
|
is_admin: is_admin,
|
||||||
|
site_id: RailsMultisite::ConnectionManagement.current_db
|
||||||
|
|
||||||
}
|
}
|
||||||
env["__mb"] = hash
|
env["__mb"] = hash
|
||||||
|
|
Loading…
Reference in New Issue