Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
job.info((error, info) => {
if (error) {
console.info('Error checking background scan status:', error)
clearInterval(timer)
client.close()
} else if (info.status === Aerospike.jobStatus.COMPLETED) {
console.info('Scan completed')
clearInterval(timer)
client.close()
} else {
console.info('Scan status:', info)
}
})
}, 10)