Skip to content

Commit 7e85654

Browse files
committed
fix: update redis member ID retrieval method and cleanup logic
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 7b7e744 commit 7e85654

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/apps/cron_service/src/jobs/inferMemberOrganizationStintChanges.job.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const job: IJobDefinition = {
2323
const qx = pgpQx(db)
2424

2525
// 1. Get a batch of work
26-
const memberIds = await redis.sRandMember(MEMBER_ORG_STINT_CHANGES_QUEUE, 500)
26+
const memberIds = await redis.sRandMemberCount(MEMBER_ORG_STINT_CHANGES_QUEUE, 500)
2727
if (!memberIds?.length) return
2828

2929
ctx.log.info({ count: memberIds.length }, 'Processing pending members.')
@@ -63,7 +63,7 @@ const job: IJobDefinition = {
6363
// 4. Cleanup: Remove only the fields we actually read
6464
await redis
6565
.multi()
66-
.hDel(datesKey, ...orgIds)
66+
.hDel(datesKey, orgIds)
6767
.sRem(MEMBER_ORG_STINT_CHANGES_QUEUE, memberId)
6868
.exec()
6969

0 commit comments

Comments
 (0)