Start the connectivity check straight away, rather than waiting for bootstrapping to succeed.

This commit is contained in:
Pagan Gazzard 2014-12-04 16:01:20 +00:00 committed by Pablo Carranza Vélez
parent 460768d366
commit 53196208b0

View File

@ -33,6 +33,8 @@ ensureConnected = (continuous = false) ->
ensureConnected(continuous) ensureConnected(continuous)
, 10 * 1000) # Every 10 seconds perform this check. , 10 * 1000) # Every 10 seconds perform this check.
console.log('Starting connectivity check..')
ensureConnected(true)
knex('config').select('value').where(key: 'uuid').then ([ uuid ]) -> knex('config').select('value').where(key: 'uuid').then ([ uuid ]) ->
if not uuid?.value if not uuid?.value
@ -92,9 +94,6 @@ knex('config').select('value').where(key: 'uuid').then ([ uuid ]) ->
setInterval(updateIpAddr, 30 * 1000) # Every 30s setInterval(updateIpAddr, 30 * 1000) # Every 30s
updateIpAddr() updateIpAddr()
console.log('Starting connectivity check..')
ensureConnected(true)
# Tell the supervisor updater that we have successfully started, so that it can do whatever it needs to. # Tell the supervisor updater that we have successfully started, so that it can do whatever it needs to.
supervisor.startupSuccessful() supervisor.startupSuccessful()