2022-10-17 06:13:35 -04:00
|
|
|
process.env.MONGO_SOCKET_TIMEOUT = '300000'
|
2022-06-08 10:07:55 -04:00
|
|
|
// Run all the mongo queries on secondaries
|
|
|
|
process.env.MONGO_CONNECTION_STRING =
|
|
|
|
process.env.READ_ONLY_MONGO_CONNECTION_STRING
|
2024-08-22 10:25:00 -04:00
|
|
|
const SAMLEmailBatchCheck = require('../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck')
|
2022-06-08 10:07:55 -04:00
|
|
|
|
2022-06-16 09:17:18 -04:00
|
|
|
const startInstitutionId = parseInt(process.argv[2])
|
2022-06-08 10:07:55 -04:00
|
|
|
const emitDetailedData = process.argv.includes('--detailed-data')
|
|
|
|
|
|
|
|
SAMLEmailBatchCheck.promises
|
2022-06-16 09:17:18 -04:00
|
|
|
.checkEmails(startInstitutionId, emitDetailedData)
|
2022-06-08 10:07:55 -04:00
|
|
|
.then(result => {
|
|
|
|
console.table(result)
|
|
|
|
process.exit()
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
console.error(err)
|
|
|
|
process.exit(1)
|
|
|
|
})
|