Bläddra i källkod

Merge pull request #24070 from overleaf/csh-fix-check_institution_users

Allow higher timeouts

GitOrigin-RevId: 8b762cab7cf1420cec732ea592a8075e96b9a5f8
Christopher Hoskin 1 år sedan
förälder
incheckning
c3ade4dce1
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      services/web/scripts/helpers/env_variable_helper.mjs

+ 2 - 1
services/web/scripts/helpers/env_variable_helper.mjs

@@ -19,8 +19,9 @@ export function ensureMongoTimeout(timeoutInMS) {
  * @returns {void}
  */
 export function ensureRunningOnMongoSecondaryWithTimeout(timeoutInMS) {
+  const timeout = parseInt(process.env.MONGO_SOCKET_TIMEOUT, 10) || 0
   if (
-    process.env.MONGO_SOCKET_TIMEOUT !== timeoutInMS.toString() ||
+    timeout < timeoutInMS ||
     process.env.MONGO_CONNECTION_STRING !==
       process.env.READ_ONLY_MONGO_CONNECTION_STRING
   ) {