Changed return value of updateDBWithOnlineDevices()

This commit is contained in:
Douglas Barone 2020-11-11 11:36:40 -04:00
parent ea2f042d70
commit a051a6d075
2 changed files with 5 additions and 3 deletions

View File

@ -13,8 +13,10 @@ cron.schedule(
'*/5 * * * *',
async () => {
logMsg('updateDBWithOnlineDevices started.')
await updateDBWithOnlineDevices()
logMsg('updateDBWithOnlineDevices finished.')
logMsg(
`updateDBWithOnlineDevices updated ${await updateDBWithOnlineDevices()} devices.`
)
},
{}
)

View File

@ -64,7 +64,7 @@ async function updateDBWithOnlineDevices() {
}
// TODO: pubsub
return true
return onlineDevices.length
}
export { getOnlineWifiDevices, updateDBWithOnlineDevices }