From 43dc177627a17959f133ce693857a7b24fe9ce7f Mon Sep 17 00:00:00 2001 From: Andrii Abramov Date: Wed, 24 Nov 2021 12:39:24 +0200 Subject: [PATCH 1/2] Update node-redis github url Changes 'node-redis' URL from http://github.com/mranney/node_redis to https://github.com/redis/node-redis in error message. Github automatically redirects from `mranney/node_redis` to `https://github.com/redis/node-redis` --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7558e48..88b3677 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ function acquireLock(client, lockName, timeout, retryDelay, onLockAcquired) { module.exports = function(client, retryDelay) { if(!(client && client.setnx)) { - throw new Error("You must specify a client instance of http://github.com/mranney/node_redis"); + throw new Error("You must specify a client instance of https://github.com/redis/node-redis"); } retryDelay = retryDelay || 50; From e091347969f38ed8b295bf72445a4caa5c294dda Mon Sep 17 00:00:00 2001 From: Andrii Abramov Date: Wed, 24 Nov 2021 12:47:21 +0200 Subject: [PATCH 2/2] Also update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b22abd3..c30106a 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ lock("myLock", function(done) { ### Initialization -To initialize redis-lock, simply call it by passing in a redis client instance, created by calling ``.createClient()`` on the excellent [node-redis](https://github.com/mranney/node_redis). This is taken in as a parameter because you might want to configure the client to suit your environment (host, port, etc.), and to enable you to reuse the client from your app if you want to. +To initialize redis-lock, simply call it by passing in a redis client instance, created by calling ``.createClient()`` on the excellent [node-redis](https://github.com/redis/node-redis). This is taken in as a parameter because you might want to configure the client to suit your environment (host, port, etc.), and to enable you to reuse the client from your app if you want to. You can also provide a second (optional) parameter: `retryDelay`. If due to any reason a lock couldn't be acquired, lock acquisition is retried after waiting for a little bit of time. `retryDelay` lets you control this delay time. Default: 50ms.