diff --git a/server/src/cronTasks.js b/server/src/cronTasks.js index 5db0916..fdbd040 100644 --- a/server/src/cronTasks.js +++ b/server/src/cronTasks.js @@ -16,7 +16,10 @@ cron.schedule('*/1 * * * *', async () => { logMsg('updateDevicesInfo started.') const devices = await updateDevicesInfo() - const mappings = await updateUserIdMappings() + + let mappings = null + + if (devices > 0) mappings = await updateUserIdMappings() logMsg( `updateDevicesInfo updated ${devices} devices and ${mappings} user-id mappings.`