Merge pull request #18856 from overleaf/jpa-server-ce-shutdown
[server-ce] improve shutdown procedure GitOrigin-RevId: 5a99868d17f597c366e42625cd39f05146dcb682
This commit is contained in:
@@ -19,7 +19,8 @@ async function main() {
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
if (Settings.overleaf && args['confirm-site-url'] !== Settings.siteUrl) {
|
||||
const isSaaS = Boolean(Settings.overleaf)
|
||||
if (isSaaS && args['confirm-site-url'] !== Settings.siteUrl) {
|
||||
console.error()
|
||||
console.error(
|
||||
'Please confirm the environment you want to disconnect ALL USERS from by specifying the site URL aka PUBLIC_URL, e.g. --confirm-site-url=https://www.dev-overleaf.com for the dev-env'
|
||||
@@ -46,8 +47,10 @@ async function main() {
|
||||
`Disconnect all users from ${args['confirm-site-url']}, with delay ${delay}`
|
||||
)
|
||||
|
||||
console.error(' Use CTRL+C in the next 5s to abort.')
|
||||
await sleep(5 * 1000)
|
||||
if (isSaaS) {
|
||||
console.error(' Use CTRL+C in the next 5s to abort.')
|
||||
await sleep(5 * 1000)
|
||||
}
|
||||
|
||||
await AdminController._sendDisconnectAllUsersMessage(delay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user