mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-01 23:30:48 +00:00
Address style fixes in app.coffee
This commit is contained in:
parent
feb4d74d28
commit
e1957def25
@ -57,11 +57,10 @@ knex.init.then ->
|
|||||||
updateIpAddr = ->
|
updateIpAddr = ->
|
||||||
callback = (error, response, body ) ->
|
callback = (error, response, body ) ->
|
||||||
if !error && response.statusCode == 200
|
if !error && response.statusCode == 200
|
||||||
api_response = JSON.parse(body)
|
|
||||||
device.updateState(
|
device.updateState(
|
||||||
ip_address: api_response.Status
|
ip_address: body.Status
|
||||||
)
|
)
|
||||||
request.get(config.gosuperAddress + '/v1/ipaddr', callback )
|
request.get({ url: "#{config.gosuperAddress}/v1/ipaddr", json: true }, callback )
|
||||||
|
|
||||||
console.log('Starting periodic check for IP addresses..')
|
console.log('Starting periodic check for IP addresses..')
|
||||||
setInterval(updateIpAddr, 30 * 1000) # Every 30s
|
setInterval(updateIpAddr, 30 * 1000) # Every 30s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user