Use throwOnTimeout
option for PQueue
This commit is contained in:
parent
bd6ee4b16d
commit
76a30a5196
10 changed files with 54 additions and 10 deletions
|
@ -100,7 +100,11 @@ const makeImagePath = (src: string) => {
|
|||
return `${ROOT_PATH}node_modules/emoji-datasource-apple/img/apple/64/${src}`;
|
||||
};
|
||||
|
||||
const imageQueue = new PQueue({ concurrency: 10, timeout: 1000 * 60 * 2 });
|
||||
const imageQueue = new PQueue({
|
||||
concurrency: 10,
|
||||
timeout: 1000 * 60 * 2,
|
||||
throwOnTimeout: true,
|
||||
});
|
||||
const images = new Set();
|
||||
|
||||
export const preloadImages = async (): Promise<void> => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue