From 08fb039689dd23896432c10c68979dd8cfabb16e Mon Sep 17 00:00:00 2001 From: Rafael Cardenas Date: Thu, 16 Oct 2025 09:17:39 -0600 Subject: [PATCH] fix: push redis updates to a stream --- src/datastore/redis-notifier.ts | 2 +- tests/api/redis-notifier.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datastore/redis-notifier.ts b/src/datastore/redis-notifier.ts index a34f06789..860104a22 100644 --- a/src/datastore/redis-notifier.ts +++ b/src/datastore/redis-notifier.ts @@ -50,7 +50,7 @@ export class RedisNotifier { }, }; logger.debug(message, 'RedisNotifier broadcasting index progress message'); - await this.redis.rpush(this.queue, JSON.stringify(message)); + await this.redis.xadd(this.queue, '*', 'data', JSON.stringify(message)); } async close() { diff --git a/tests/api/redis-notifier.test.ts b/tests/api/redis-notifier.test.ts index 0236574ba..777c3c673 100644 --- a/tests/api/redis-notifier.test.ts +++ b/tests/api/redis-notifier.test.ts @@ -3,7 +3,7 @@ const messages: string[] = []; // Mock Redis to capture messages jest.mock('ioredis', () => { const redisMock = jest.fn().mockImplementation(() => ({ - rpush: jest.fn((_, message) => { + xadd: jest.fn((queue, id, field, message) => { messages.push(message); }), quit: jest.fn().mockResolvedValue(undefined),