Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit cea0c56

Browse files
committed
chore: undo
1 parent d1af955 commit cea0c56

2 files changed

Lines changed: 6 additions & 19 deletions

File tree

apps/master/src/index.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as Sentry from "@sentry/node";
66
import { Integrations } from "@sentry/tracing";
77
import debug from "debug";
88
import { MongoClient } from "mongodb";
9-
import { createCluster } from "redis";
9+
import { createClient } from "redis";
1010

1111
import calculatePresenceUsage from "./util/calculatePresenceUsage.js";
1212
import updateScience from "./util/updateScience.js";
@@ -23,14 +23,8 @@ Sentry.init({
2323
integrations: [new Integrations.Mongo()]
2424
});
2525

26-
export const redis = createCluster({
27-
rootNodes: process.env.REDIS_URL?.split(",")?.map(url => ({
28-
url
29-
})) || [
30-
{
31-
url: "redis://localhost:6379"
32-
}
33-
]
26+
export const redis = createClient({
27+
url: process.env.REDIS_URL || "redis://localhost:6379"
3428
}),
3529
mongo = new MongoClient(process.env.MONGO_URL!, {
3630
appName: "PreMiD-API-Master"

apps/worker/src/index.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { ApolloServer } from "apollo-server-fastify";
1313
import responseCachePlugin from "apollo-server-plugin-response-cache";
1414
import fastify, { FastifyContext, FastifyReply, FastifyRequest } from "fastify";
15-
import { createCluster } from "redis";
15+
import { createClient, createCluster } from "redis";
1616
import { MongoClient } from "mongodb";
1717

1818
import appUpdate from "./generic/appUpdate";
@@ -43,15 +43,8 @@ if (process.env.SENTRY_DSN)
4343
export const mongodb = new MongoClient(process.env.MONGO_URL!, {
4444
appName: "PreMiD-API-Worker"
4545
}),
46-
redis = createCluster({
47-
rootNodes: process.env.REDIS_URL?.split(",")?.map(url => ({
48-
url
49-
})) || [
50-
{
51-
url: "redis://localhost:6379"
52-
}
53-
],
54-
useReplicas: false
46+
redis = createClient({
47+
url: process.env.REDIS_URL || "redis://localhost:6379"
5548
}),
5649
baseRedisCache = new BaseRedisCache({
5750
//@ts-ignore

0 commit comments

Comments
 (0)