mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02:00
[web] wait for prefetching of projects listing (#25650)
GitOrigin-RevId: 59fb0c74b8cf6a496e256960f7f2e83ace2c5ee0
This commit is contained in:
@@ -314,18 +314,9 @@ async function projectListPage(req, res, next) {
|
||||
delete req.session.saml
|
||||
}
|
||||
|
||||
function fakeDelay() {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => resolve(undefined), 0)
|
||||
})
|
||||
}
|
||||
|
||||
const prefetchedProjectsBlob = await Promise.race([
|
||||
projectsBlobPending,
|
||||
fakeDelay(),
|
||||
])
|
||||
const prefetchedProjectsBlob = await projectsBlobPending
|
||||
Metrics.inc('project-list-prefetch-projects', 1, {
|
||||
status: prefetchedProjectsBlob ? 'success' : 'too-slow',
|
||||
status: prefetchedProjectsBlob ? 'success' : 'error',
|
||||
})
|
||||
|
||||
// in v2 add notifications for matching university IPs
|
||||
|
||||
Reference in New Issue
Block a user