فهرست منبع

Merge pull request #30583 from overleaf/ar/increase-v1-timeout

[web] increase timeout for v1 requests to 60 seconds

GitOrigin-RevId: 0deb5e5d5fbe6b63d12263f223d76e6aa83b20a5
Andrew Rumble 7 ماه پیش
والد
کامیت
b35ff1f33e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      services/web/app/src/Features/Institutions/InstitutionsAPI.mjs

+ 3 - 1
services/web/app/src/Features/Institutions/InstitutionsAPI.mjs

@@ -140,6 +140,7 @@ function getLicencesForAnalytics(lag, queryDate, callback) {
       path: `/api/v2/institutions/institutions_licences`,
       body: { query_date: queryDate, lag },
       defaultErrorMessage: 'Could not get institutions licences',
+      timeout: 60_000,
     },
     callback
   )
@@ -349,13 +350,14 @@ function makeAffiliationRequest(options, callback) {
   if (!options.extraSuccessStatusCodes) {
     options.extraSuccessStatusCodes = []
   }
+  const timeout = options.timeout ? options.timeout : settings.apis.v1.timeout
   const requestOptions = {
     method: options.method,
     url: `${settings.apis.v1.url}${options.path}`,
     body: options.body,
     auth: { user: settings.apis.v1.user, pass: settings.apis.v1.pass },
     json: true,
-    timeout: settings.apis.v1.timeout,
+    timeout,
   }
   if (options.method === 'GET') {
     requestOptions.maxAttempts = 3