Avoid synchronous fetching for remote embedding documents.

This commit is contained in:
hackademix 2022-02-20 17:03:57 +01:00
parent 5b3e7924f6
commit a9653fc7c9
1 changed files with 5 additions and 0 deletions

View File

@ -115,6 +115,11 @@
}
setup(policy);
});
if (!this.syncFetchPolicy && this.embeddingDocument) {
asyncFetch();
return;
}
debug(`Synchronously fetching policy for ${url}.`);
let policy = null;
let attempts = 100;