1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(server): re-enable Redis unix socket support (#1494)

This commit is contained in:
Fynn Petersen-Frey 2023-01-31 16:59:59 +01:00 committed by GitHub
parent 6a852332de
commit d0f8d8d1f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,15 +7,20 @@ const redisHost = process.env.REDIS_HOSTNAME || 'immich_redis';
const redisPort = parseInt(process.env.REDIS_PORT || '6379');
const redisDb = parseInt(process.env.REDIS_DBINDEX || '0');
const redisPassword = process.env.REDIS_PASSWORD || undefined;
// const redisSocket = process.env.REDIS_SOCKET || undefined;
const redisSocket = process.env.REDIS_SOCKET || undefined;
export class RedisIoAdapter extends IoAdapter {
private adapterConstructor: any;
async connectToRedis(): Promise<void> {
const pubClient = createClient({
url: `redis://${redisHost}:${redisPort}/${redisDb}`,
password: redisPassword,
database: redisDb,
socket: {
host: redisHost,
port: redisPort,
path: redisSocket,
},
});
const subClient = pubClient.duplicate();