mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #27518 from overleaf/tm-revert-scriptrunner-ensured-secondary
Remove ScriptRunner usage in institution user checks and SSO ID migration scripts GitOrigin-RevId: 69bf575f879516e8daeb068f6911856c9d6f226c
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import InstitutionsManager from '../app/src/Features/Institutions/InstitutionsManager.js'
|
||||
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
// ScriptRunner can not be used when using this assertion
|
||||
ensureRunningOnMongoSecondaryWithTimeout(300000)
|
||||
|
||||
const institutionId = parseInt(process.argv[2])
|
||||
@@ -19,7 +19,7 @@ async function main() {
|
||||
}
|
||||
|
||||
try {
|
||||
await scriptRunner(main)
|
||||
await main()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import SAMLEmailBatchCheck from '../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck.mjs'
|
||||
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
|
||||
|
||||
// ScriptRunner can not be used when using this assertion
|
||||
ensureRunningOnMongoSecondaryWithTimeout(300000)
|
||||
|
||||
const startInstitutionId = parseInt(process.argv[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import SAMLUserIdMigrationHandler from '../modules/saas-authentication/app/src/SAML/SAMLUserIdMigrationHandler.mjs'
|
||||
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
// ScriptRunner can not be used when using this assertion
|
||||
ensureRunningOnMongoSecondaryWithTimeout(300000)
|
||||
|
||||
const institutionId = parseInt(process.argv[2])
|
||||
@@ -11,7 +11,7 @@ const emitUsers = process.argv.includes('--emit-users')
|
||||
console.log('Checking SSO user ID migration for institution:', institutionId)
|
||||
|
||||
try {
|
||||
await scriptRunner(main)
|
||||
await main()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user