Use throwOnTimeout
option for PQueue
This commit is contained in:
parent
bd6ee4b16d
commit
76a30a5196
10 changed files with 54 additions and 10 deletions
|
@ -62,7 +62,11 @@ export function createWaitBatcher<ItemType>(
|
|||
let waitBatcher: BatcherType<ItemType>;
|
||||
let timeout: NodeJS.Timeout | null;
|
||||
let items: Array<ItemHolderType<ItemType>> = [];
|
||||
const queue = new PQueue({ concurrency: 1, timeout: 1000 * 60 * 2 });
|
||||
const queue = new PQueue({
|
||||
concurrency: 1,
|
||||
timeout: 1000 * 60 * 2,
|
||||
throwOnTimeout: true,
|
||||
});
|
||||
|
||||
async function _kickBatchOff() {
|
||||
const itemsRef = items;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue