Flush all watchers on empty queue
This commit is contained in:
parent
67892d838c
commit
746e99b8c2
8 changed files with 317 additions and 89 deletions
|
@ -6,6 +6,7 @@ import { createBatcher } from './batcher';
|
|||
import { createWaitBatcher } from './waitBatcher';
|
||||
|
||||
const updateMessageBatcher = createBatcher<MessageAttributesType>({
|
||||
name: 'messageBatcher.updateMessageBatcher',
|
||||
wait: 500,
|
||||
maxSize: 50,
|
||||
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
||||
|
@ -31,6 +32,7 @@ export function setBatchingStrategy(keepBatching = false): void {
|
|||
}
|
||||
|
||||
export const saveNewMessageBatcher = createWaitBatcher<MessageAttributesType>({
|
||||
name: 'messageBatcher.saveNewMessageBatcher',
|
||||
wait: 500,
|
||||
maxSize: 30,
|
||||
processBatch: async (messageAttrs: Array<MessageAttributesType>) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue