Merge pull request #15923 from overleaf/jpa-tweak-delay-in-seconds

[web] allow disconnect_all_users.js --delay-in-seconds=0

GitOrigin-RevId: f52f26588da502ab43724854a3fe138347767f09
This commit is contained in:
Jakob Ackermann 2023-11-24 13:02:42 +01:00 committed by Copybot
parent bd6f599c2a
commit 9dca97cb50

View file

@ -34,7 +34,13 @@ async function main() {
console.error(' Are you running this script in the correct environment?')
process.exit(1)
}
const delay = parseInt(args['delay-in-seconds'], 10) || 10
const delay = parseInt(args['delay-in-seconds'] || '10', 10)
if (!(delay >= 0)) {
console.error(
`--delay-in-seconds='${args['delay-in-seconds']}' should be a number >=0`
)
process.exit(1)
}
console.log()
console.log(
`Disconnect all users from ${args['confirm-site-url']}, with delay ${delay}`