mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 12:51:35 +02:00
Merge pull request #30583 from overleaf/ar/increase-v1-timeout
[web] increase timeout for v1 requests to 60 seconds GitOrigin-RevId: 0deb5e5d5fbe6b63d12263f223d76e6aa83b20a5
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user