Add p-queue timeouts; fix search crash; improve promise rejection logging
This commit is contained in:
parent
9f9ce91a9c
commit
bc3b61db1d
17 changed files with 54 additions and 26 deletions
|
@ -39,7 +39,7 @@ export function createBatcher<ItemType>(
|
|||
let batcher: BatcherType<ItemType>;
|
||||
let timeout: NodeJS.Timeout | null;
|
||||
let items: Array<ItemType> = [];
|
||||
const queue = new PQueue({ concurrency: 1 });
|
||||
const queue = new PQueue({ concurrency: 1, timeout: 1000 * 60 * 2 });
|
||||
|
||||
function _kickBatchOff() {
|
||||
const itemsRef = items;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue