Skip to content

refactor: replace ioredis with Bun's built-in RedisClient - #26

Merged
zulfikar-ditya merged 2 commits into
aolus-software:mainfrom
zulfikar-ditya:refactor/bun-redis-client
May 28, 2026
Merged

refactor: replace ioredis with Bun's built-in RedisClient#26
zulfikar-ditya merged 2 commits into
aolus-software:mainfrom
zulfikar-ditya:refactor/bun-redis-client

Conversation

@zulfikar-ditya

@zulfikar-ditya zulfikar-ditya commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Cache (src/libs/cache/cache.ts) and health checks (src/modules/home/routes.ts) now use Bun.RedisClient directly — no more ioredis import in our code.
  • BullMQ queue/worker (src/bull/queue/send-email.queue.ts, src/bull/worker/send-email.worker.ts) receive a plain connection-options object so BullMQ constructs its own ioredis internally. Our codebase no longer imports ioredis.
  • Removed ioredis from dependencies. Added @eslint/js and globals to devDependencies (referenced by eslint.config.mjs but missing from the manifest, breaking the pre-commit hook). Fixed pre-existing lint errors in the ClickHouse migrate script that the hook now surfaces.

Notes

  • BullMQ still pulls in ioredis transitively (it's a hard dependency of BullMQ). The win is that our code no longer touches it.
  • Cache.set / Cache.flush now go through RedisClient.send(...) since Bun's typed methods don't accept TTL.
  • Cache.disconnect() became synchronous because Bun.RedisClient.close() is sync.

Test plan

  • bun run typecheck passes
  • bun run lint passes
  • bun run build succeeds
  • bun run dev boots and /health returns healthy for redis and redisQueue
  • Trigger a flow that enqueues an email job; confirm worker processes it

🤖 Generated with Claude Code

zulfikar-ditya and others added 2 commits May 28, 2026 09:22
Cache and health checks now use Bun.RedisClient directly. BullMQ
receives a plain connection-options object so it constructs its
own ioredis internally without our code importing it. Also adds
@eslint/js and globals to devDependencies (referenced by
eslint.config.mjs but missing from the manifest, breaking the
pre-commit hook). Fixes pre-existing lint errors in the ClickHouse
migrate script that the hook now surfaces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI prettier check was failing on CLAUDE.md formatting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zulfikar-ditya
zulfikar-ditya merged commit 5b20f74 into aolus-software:main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant