Improve Self host setup (#30)
* Add self host setup * Improve blunders * Move to bull mq * More changes * Add example code for sending test emails
This commit is contained in:
11
apps/web/src/server/redis.ts
Normal file
11
apps/web/src/server/redis.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import IORedis from "ioredis";
|
||||
import { env } from "~/env";
|
||||
|
||||
export let connection: IORedis | null = null;
|
||||
|
||||
export const getRedis = () => {
|
||||
if (!connection) {
|
||||
connection = new IORedis(env.REDIS_URL, { maxRetriesPerRequest: null });
|
||||
}
|
||||
return connection;
|
||||
};
|
Reference in New Issue
Block a user