diff --git a/lib/orchestrator/core/system_proxy.rb b/lib/orchestrator/core/system_proxy.rb index de2f4c7..91ce0a3 100644 --- a/lib/orchestrator/core/system_proxy.rb +++ b/lib/orchestrator/core/system_proxy.rb @@ -201,7 +201,7 @@ def subscribe(mod_name, index, status = nil, callback = nil, &block) thread.schedule do begin defer.resolve ( - thread.observer.subscribe(options) + thread.observer.subscribe(**options) ) rescue => e defer.reject(e) @@ -210,7 +210,7 @@ def subscribe(mod_name, index, status = nil, callback = nil, &block) defer.promise.value else - @thread.observer.subscribe(options) + @thread.observer.subscribe(**options) end @origin.add_subscription sub if @origin diff --git a/lib/orchestrator/status.rb b/lib/orchestrator/status.rb index 70968e5..f97449c 100644 --- a/lib/orchestrator/status.rb +++ b/lib/orchestrator/status.rb @@ -49,6 +49,7 @@ def initialize(thread, controller) # Subscribes to updates from a system module # Modules do not have to exist and updates will be triggered as soon as they do exist + def subscribe(status:, callback:, on_thread:, sys_name: nil, sys_id: nil, mod: nil, mod_name: nil, mod_id: nil, index: nil) # Build the subscription object (as loosely coupled as we can) sub = Subscription.new(as_sym(sys_name), as_sym(sys_id), as_sym(mod_name), as_sym(mod_id), index.to_i, as_sym(status), callback, on_thread) diff --git a/lib/orchestrator/websocket_manager.rb b/lib/orchestrator/websocket_manager.rb index 009609a..2726e74 100644 --- a/lib/orchestrator/websocket_manager.rb +++ b/lib/orchestrator/websocket_manager.rb @@ -301,12 +301,12 @@ def try_bind(id, sys, system, mod_name, index, name, lookup) thread = mod_man.thread thread.schedule do defer.resolve ( - thread.observer.subscribe(options) + thread.observer.subscribe(**options) ) end else @reactor.schedule do - defer.resolve @stattrak.subscribe(options) + defer.resolve @stattrak.subscribe(**options) end end end