add log to stream loop

This commit is contained in:
Emily
2024-08-30 17:27:34 +02:00
parent 6d26c3c8af
commit a2034551ec
2 changed files with 12 additions and 5 deletions

View File

@@ -19,15 +19,13 @@ export async function startStreamLoop() {
await RedisStreamService.startReadingLoop({
streamName: requireEnv('STREAM_NAME'),
delay: { base: 100, empty: 5000 },
readBlock: 2500
delay: { base: 10, empty: 5000 },
readBlock: 2000
}, processStreamEvent);
}
export async function processStreamEvent(data: Record<string, string>) {
try {
const eventType = data._type;