Added env var to control sleeps

This commit is contained in:
Douglas Barone 2020-12-23 08:29:10 -04:00
parent 9085027db1
commit e7afddad8d

View File

@ -2,11 +2,11 @@ import { logError, logInfo } from './lib/logger'
import { updateUserIdMappings } from './lib/paloalto'
import { updateDevicesInfo } from './lib/wifiDevices'
const SLEEP_IN_MILLISECONDS = 10000
const SLEEP_IN_MILLISECONDS = process.env.TASK_SLEEP || 10000
logInfo({
tags: ['task'],
message: 'Starting tasks...'
message: `Running tasks with ${SLEEP_IN_MILLISECONDS}ms sleeps.`
})
async function updateDevicesTask() {