Skip to content

Commit cab2011

Browse files
committed
Update connection config details
1 parent a122559 commit cab2011

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

workers/event_catcher/event_catcher.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ def run!
2121

2222
notify_started
2323

24+
puts "Collecting events..."
2425
wait_for_updates(vim) do |property_change|
26+
puts property_change.name
2527
next unless property_change.name.match?(/latestPage.*/)
2628

2729
events = Array(property_change.val).map { |event| parse_event(event) }
30+
puts events.to_json
2831
publish_events(events)
2932
end
3033
rescue Interrupt
@@ -171,10 +174,9 @@ def setproctitle
171174
def main(args)
172175
setproctitle
173176

174-
default_endpoint = args["endpoints"]&.detect { |ep| ep["role"] == "default" }
175-
default_authentication = args["authentications"]&.detect { |auth| auth["authtype"] == "default" }
177+
connection_config = args["connection_config"]
176178

177-
event_catcher = EventCatcher.new(args["ems_id"], default_endpoint, default_authentication, args["messaging_opts"])
179+
event_catcher = EventCatcher.new(args["ems_id"], connection_config["default"]["endpoint"], connection_config["default"]["authentication"], args["messaging_opts"])
178180

179181
event_catcher.run!
180182
end

0 commit comments

Comments
 (0)