Start the supervisor update check ASAP, it allows us to push (and automatically update to) new supervisor images that fix issues in earlier stages.

This commit is contained in:
Pagan Gazzard 2014-10-01 17:14:37 +01:00 committed by Pablo Carranza Vélez
parent 5bb552f065
commit 5efcde7922
2 changed files with 8 additions and 6 deletions

View File

@ -83,12 +83,6 @@ knex('config').select('value').where(key: 'uuid').then ([ uuid ]) ->
, 5 * 60 * 1000) # Every 5 mins
application.update()
console.log('Starting periodic check for supervisor updates..')
setInterval(->
supervisor.update()
, 5 * 60 * 1000) # Every 5 mins
supervisor.update()
updateIpAddr = ->
utils.findIpAddrs().then (ipAddrs) ->
application.updateDeviceInfo(

View File

@ -6,6 +6,14 @@ supervisor = require './supervisor-update'
# Make sure the supervisor-update has initialised before we continue, as it will handle restarting to add mounts if
# necessary.
supervisor.initialised.then ->
# Start the update checks ASAP, as any later point may fail,
# but at least if we're checking for updates we may be able to update to make them work!
console.log('Starting periodic check for supervisor updates..')
setInterval(->
supervisor.update()
, 5 * 60 * 1000) # Every 5 mins
supervisor.update()
knex = require './db'
# Wait for the DB schema to be created