Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
avoid starving the HM event loop so HM can login to NATS
Browse files Browse the repository at this point in the history
Change-Id: I523595c9b024bec567e7d229fdadad8cf1ee622f
  • Loading branch information
Vadim Spivak committed Jun 7, 2011
1 parent e46b9af commit 40193aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions health_manager/lib/health_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def create_version_entry
def run
@started = Time.now.to_i
register_error_handler
configure_timers

NATS.on_error do |e|
@logger.error("NATS problem, #{e}")
Expand All @@ -146,9 +145,11 @@ def run
@logger.error("#{e.backtrace.join("\n")}")
end

NATS.start(:uri => @config['mbus'])
register_as_component
subscribe_to_messages
NATS.start(:uri => @config['mbus']) do
configure_timers
register_as_component
subscribe_to_messages
end
end

# We use the CloudController database configuration
Expand Down

0 comments on commit 40193aa

Please sign in to comment.