fix(admin): use named export Cluster from ioredis 5.x
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions

Previous `import { default as Cluster }` caused runtime to get Redis
instance instead of Cluster, resulting in ECONNREFUSED errors.
This commit is contained in:
ZhenYi 2026-04-20 10:03:26 +08:00
parent a9c51526b8
commit 05909dbde7

View File

@ -3,7 +3,7 @@
* *
* admin:* * admin:*
*/ */
import Redis, { default as Cluster } from "ioredis"; import Redis, { Cluster } from "ioredis";
import type { ClusterNode } from "ioredis"; import type { ClusterNode } from "ioredis";
import { REDIS_URL, REDIS_CLUSTER_URLS } from "./env"; import { REDIS_URL, REDIS_CLUSTER_URLS } from "./env";