mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 03:01:32 +03:00
feat: apply higher priority for doc request (#4401)
This commit is contained in:
parent
65bb30558e
commit
feb3e64839
@ -217,7 +217,7 @@ export const gqlFetcherFactory = (endpoint: string) => {
|
||||
|
||||
export const fetchWithTraceReport = async (
|
||||
input: RequestInfo | URL,
|
||||
init?: RequestInit,
|
||||
init?: RequestInit & { priority?: 'auto' | 'low' | 'high' }, // https://github.com/microsoft/TypeScript/issues/54472
|
||||
traceOptions?: { event: string }
|
||||
): Promise<Response> => {
|
||||
const startTime = new Date().toISOString();
|
||||
|
@ -19,7 +19,10 @@ export async function downloadBinaryFromCloud(
|
||||
}
|
||||
const response = await fetchWithTraceReport(
|
||||
runtimeConfig.serverUrlPrefix +
|
||||
`/api/workspaces/${rootGuid}/docs/${pageGuid}`
|
||||
`/api/workspaces/${rootGuid}/docs/${pageGuid}`,
|
||||
{
|
||||
priority: 'high',
|
||||
}
|
||||
);
|
||||
if (response.ok) {
|
||||
const arrayBuffer = await response.arrayBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user