Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/orchestrator/core/system_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/orchestrator/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/orchestrator/websocket_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down