Merge pull request #18856 from overleaf/jpa-server-ce-shutdown

[server-ce] improve shutdown procedure

GitOrigin-RevId: 5a99868d17f597c366e42625cd39f05146dcb682
This commit is contained in:
Jakob Ackermann
2024-06-18 08:04:04 +00:00
committed by Copybot
parent 6980a44f8b
commit e36de5a62d
8 changed files with 14 additions and 10 deletions
+6 -3
View File
@@ -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)
}