(options: {
name: string;
onFlush: () => Promise<void>;
enableParallelProcessing?: boolean;
})
| 99 | public addObserver: AddObserver | null = null; |
| 100 | |
| 101 | constructor(options: { |
| 102 | name: string; |
| 103 | onFlush: () => Promise<void>; |
| 104 | enableParallelProcessing?: boolean; |
| 105 | }) { |
| 106 | this.logger = createLogger({ name: options.name }); |
| 107 | this.name = options.name; |
| 108 | this.lockKey = `lock:${this.name}`; |
| 109 | this.onFlush = options.onFlush; |
| 110 | this.enableParallelProcessing = options.enableParallelProcessing ?? false; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Returns the Redis key of the buffer's main list (the queue of pending |
nothing calls this directly
no test coverage detected