make MutexOptions optional
This commit is contained in:
parent
33a49cba4a
commit
20496cc24b
@ -16,7 +16,7 @@ export class MutexLock {
|
|||||||
this.redisClient = redisClient;
|
this.redisClient = redisClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async create(options: MutexOptions) {
|
static async create(options?: MutexOptions) {
|
||||||
const redisClient = await redis
|
const redisClient = await redis
|
||||||
.createClient({
|
.createClient({
|
||||||
url: `redis://${options?.redis?.host ?? "127.0.0.1"}:${options?.redis?.port ?? 6379}`,
|
url: `redis://${options?.redis?.host ?? "127.0.0.1"}:${options?.redis?.port ?? 6379}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user