diff --git a/server/src/cronTasks.js b/server/src/cronTasks.js index 1b7b116..c121c2e 100644 --- a/server/src/cronTasks.js +++ b/server/src/cronTasks.js @@ -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(