refactor: replace ioredis with Bun's built-in RedisClient - #26
Merged
zulfikar-ditya merged 2 commits intoMay 28, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/libs/cache/cache.ts) and health checks (src/modules/home/routes.ts) now useBun.RedisClientdirectly — no moreioredisimport in our code.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.ioredisfromdependencies. Added@eslint/jsandglobalstodevDependencies(referenced byeslint.config.mjsbut 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
Cache.set/Cache.flushnow go throughRedisClient.send(...)since Bun's typed methods don't accept TTL.Cache.disconnect()became synchronous becauseBun.RedisClient.close()is sync.Test plan
bun run typecheckpassesbun run lintpassesbun run buildsucceedsbun run devboots and/healthreturns healthy forredisandredisQueue🤖 Generated with Claude Code