2024-10-30 10:23:34 -04:00
|
|
|
import SAMLEmailBatchCheck from '../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck.mjs'
|
2024-10-18 07:04:57 -04:00
|
|
|
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
|
|
|
|
|
|
|
|
ensureRunningOnMongoSecondaryWithTimeout(300000)
|
|
|
|
|
|
|
|
const startInstitutionId = parseInt(process.argv[2])
|
|
|
|
const emitDetailedData = process.argv.includes('--detailed-data')
|
|
|
|
|
|
|
|
try {
|
|
|
|
const result = await SAMLEmailBatchCheck.promises.checkEmails(
|
|
|
|
startInstitutionId,
|
|
|
|
emitDetailedData
|
|
|
|
)
|
|
|
|
console.table(result)
|
|
|
|
process.exit()
|
|
|
|
} catch (error) {
|
|
|
|
console.error(error)
|
|
|
|
process.exit(1)
|
|
|
|
}
|