Better log message

This commit is contained in:
Douglas Barone 2020-12-17 13:04:06 -04:00
parent 738bae1a15
commit cf21f1534d

View File

@ -17,13 +17,15 @@ cron.schedule('*/1 * * * *', async () => {
const devices = await updateDevicesInfo()
logMsg(`updateDevicesInfo updated ${devices} devices.`)
let mappings = 0
if (devices > 0) mappings = await updateUserIdMappings()
logMsg(
`updateDevicesInfo updated ${devices} devices and ${mappings} user-id mappings.`
)
if (devices > 0) {
logMsg('updateUserIdMappings started.')
mappings = await updateUserIdMappings()
logMsg(`updateUserIdMappings updated ${mappings} user-id mappings.`)
}
})
cron.schedule(