Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: drop redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazmi35 committed Feb 12, 2024
1 parent 6263ca1 commit 45ad52c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 71 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"dotenv": "^16.4.2",
"drizzle-orm": "^0.29.3",
"gradient-string": "^2.0.2",
"ioredis": "^5.3.2",
"kearsarge": "^1.0.3",
"pino": "^8.18.0",
"pino-pretty": "^10.3.1",
Expand Down
58 changes: 0 additions & 58 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Structures/NezuGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class NezuGateway extends EventEmitter {
await channel.bindQueue(queue, RabbitMQ.GATEWAY_QUEUE_STATS, route);
}

// TODO [2024-02-20]: Implement this
// await channel.consume(queue, async message => {
// if (!message) return;
// const content = JSON.parse(message.content.toString()) as { route: string; };
Expand Down
12 changes: 0 additions & 12 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Result } from "@sapphire/result";
import { chunk, range } from "@sapphire/utilities";
import { PresenceUpdateStatus } from "discord-api-types/v10";
import Dockerode from "dockerode";
import type { default as IORedis, NatMap } from "ioredis";

export const getShardCount = async (): Promise<{ end: number | undefined; start: number; } | null | undefined> => {
const replicaCount = process.env.GATEWAY_REPLICA_COUNT === undefined ? null : Number(process.env.GATEWAY_REPLICA_COUNT);
Expand Down Expand Up @@ -42,17 +41,6 @@ export const getShardCount = async (): Promise<{ end: number | undefined; start:
: null;
};

export const redisUsername = process.env.REDIS_USERNAME;
export const redisPassword = process.env.REDIS_PASSWORD;
export const redisHost = process.env.REDIS_HOST;
export const redisPort = Number(process.env.REDIS_PORT);
export const redisDb = Number(process.env.REDIS_DB ?? 0);
export const redisNatMap = JSON.parse(process.env.REDIS_NAT_MAP ?? "{}") as NatMap;
export const redisClusters = JSON.parse(process.env.REDIS_CLUSTERS ?? "[]") as IORedis.ClusterNode[];
export const redisClusterScaleReads = process.env.REDIS_CLUSTER_SCALE_READS as IORedis.NodeRole | undefined ?? process.env.REDIS_SCALE_READS as IORedis.NodeRole | undefined ?? "all" as IORedis.NodeRole;
export const redisScanCount = Number(process.env.REDIS_SCAN_COUNT ?? 1_000);
export const redisDisablePipelining = process.env.REDIS_DISABLE_PIPELINING === "true";

export const storeLogs = process.env.STORE_LOGS === "true";
export const lokiHost = process.env.LOKI_HOST === undefined ? undefined : new URL(process.env.LOKI_HOST);
export const useRouting = process.env.USE_ROUTING === "true";
Expand Down

0 comments on commit 45ad52c

Please sign in to comment.