improve(buffer): prep postgres buffer

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-03 09:19:00 +01:00
parent a2b74a9b4d
commit ff2dca42f6
8 changed files with 214 additions and 191 deletions

View File

@@ -1,7 +1,16 @@
import { BotBuffer } from './bot-buffer';
import { BotBuffer as NewBotBuffer } from './bot-buffer-psql';
import { EventBuffer } from './event-buffer';
import { EventBuffer as NewEventBuffer } from './event-buffer-psql';
import { ProfileBuffer } from './profile-buffer';
import { ProfileBuffer as NewProfileBuffer } from './profile-buffer-psql';
export const eventBuffer = new EventBuffer();
export const profileBuffer = new ProfileBuffer();
export const botBuffer = new BotBuffer();
export const eventBuffer = process.env.USE_NEW_BUFFER
? new NewEventBuffer()
: new EventBuffer();
export const profileBuffer = process.env.USE_NEW_BUFFER
? new NewProfileBuffer()
: new ProfileBuffer();
export const botBuffer = process.env.USE_NEW_BUFFER
? new NewBotBuffer()
: new BotBuffer();