fix(server): wrap read-modify-write apis with distributed lock (#6142)

This commit is contained in:
DarkSky
2024-03-19 02:16:23 +00:00
parent a4cd8d6ca3
commit f18133af82
20 changed files with 412 additions and 79 deletions

View File

@@ -54,3 +54,10 @@ export class SocketIoRedis extends Redis {
super({ ...config.plugins.redis, db: (config.plugins.redis?.db ?? 0) + 3 });
}
}
@Injectable()
export class MutexRedis extends Redis {
constructor(config: Config) {
super({ ...config.plugins.redis, db: (config.plugins.redis?.db ?? 0) + 4 });
}
}