Skip to content

Commit

Permalink
start observers earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
branch14 committed Oct 19, 2016
1 parent dc48f6b commit ba9cc9f
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions lib/streambox/daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ def start_recording_monitor
self.recordings = {}

notifier.watch('../recordings', *events) do |event|
logger.debug event.inspect

name = event.name
self.recordings[name] ||= {}

Expand Down Expand Up @@ -403,40 +405,40 @@ def run
logger.info "[1] Start recording monitor..."
start_recording_monitor

logger.info "[2] Knocking..."
logger.info "[2] Start observers..."
start_observer 'record'
start_observer 'sync'
start_observer 'darkice'

logger.info "[3] Knocking..."
knock!
logger.info "[3] Knocking complete."
logger.info "[4] Knocking complete."
logger.debug "Endpoint #{@config.endpoint}"

logger.info "[4] Start Streamer..."
logger.info "[5] Start Streamer..."
start_streamer
logger.info "[5] Streamer started."
logger.info "[6] Streamer started."

if dev_box?
logger.warn "[6] Dev Box detected! Skipping check for release."
logger.warn "[7] Dev Box detected! Skipping check for release."
else
logger.warn "[6] Checking for release..."
logger.warn "[7] Checking for release..."
check_for_release
end

logger.info "[7] Start heartbeat..."
logger.info "[8] Start heartbeat..."
start_heartbeat

logger.info "[8] Registering..."
logger.info "[9] Registering..."
register!
logger.info "[9] Registration complete."
logger.info "[A] Registration complete."

logger.info "[A] Start reporting..."
logger.info "[B] Start reporting..."
start_reporting

logger.info "[B] Start publisher..."
logger.info "[C] Start publisher..."
start_publisher

logger.info "[C] Start observers..."
start_observer 'darkice'
start_observer 'record'
start_observer 'sync'

logger.info "[D] Start sync loop..."
start_sync

Expand Down

0 comments on commit ba9cc9f

Please sign in to comment.