mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fix loading message am message bus stuff
This commit is contained in:
@@ -32,6 +32,7 @@ class MessageBus::Diagnostics
|
||||
end
|
||||
|
||||
MessageBus.subscribe('/_diagnostics/discover') do |msg|
|
||||
MessageBus.on_connect.call msg.site_id if MessageBus.on_connect
|
||||
MessageBus.publish '/_diagnostics/process-discovery', {
|
||||
pid: Process.pid,
|
||||
process_name: $0,
|
||||
@@ -39,6 +40,7 @@ class MessageBus::Diagnostics
|
||||
uptime: (Time.now.to_f - start_time).to_i,
|
||||
hostname: hostname
|
||||
}, user_ids: [msg.data["user_id"]]
|
||||
MessageBus.on_disconnect.call msg.site_id if MessageBus.on_disconnect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,8 +9,6 @@ class MessageBus::Rack::Middleware
|
||||
def self.start_listener
|
||||
unless @started_listener
|
||||
MessageBus.subscribe do |msg|
|
||||
p msg.channel
|
||||
p msg.message_id
|
||||
EM.next_tick do
|
||||
@@connection_manager.notify_clients(msg) if @@connection_manager
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user