Build Phase 2 judge vertical slice
This commit is contained in:
19
apps/api/src/redis.ts
Normal file
19
apps/api/src/redis.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import Redis from "ioredis"
|
||||
|
||||
import { config } from "./config"
|
||||
|
||||
export const redis = new Redis(config.redisUrl, {
|
||||
maxRetriesPerRequest: 1,
|
||||
})
|
||||
|
||||
export function createBlockingRedis() {
|
||||
return new Redis(config.redisUrl, {
|
||||
maxRetriesPerRequest: null,
|
||||
})
|
||||
}
|
||||
|
||||
export function createSubscriberRedis() {
|
||||
return new Redis(config.redisUrl, {
|
||||
maxRetriesPerRequest: null,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user