🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

redis-semaphore

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-semaphore - npm Package Compare versions

Comparing version

to
1.0.3

14

lib/RedisFairSemaphore.js

@@ -6,8 +6,2 @@ const RedisMutex = require('./RedisMutex')

const DEFAULT_TIMEOUTS = {
lockTimeout: 10000,
acquireTimeout: 10000,
retryInterval: 10
}
class RedisFairSemaphore extends RedisMutex {

@@ -19,7 +13,7 @@ constructor(

{
lockTimeout,
acquireTimeout,
retryInterval,
lockTimeout = 10000,
acquireTimeout = 10000,
retryInterval = 10,
refreshInterval
} = DEFAULT_TIMEOUTS
} = {}
) {

@@ -26,0 +20,0 @@ super(client, key, {

@@ -8,8 +8,2 @@ const Redis = require('ioredis')

const DEFAULT_TIMEOUTS = {
lockTimeout: 10000,
acquireTimeout: 10000,
retryInterval: 10
}
class RedisMutex {

@@ -20,7 +14,7 @@ constructor(

{
lockTimeout,
acquireTimeout,
retryInterval,
lockTimeout = 10000,
acquireTimeout = 10000,
retryInterval = 10,
refreshInterval
} = DEFAULT_TIMEOUTS
} = {}
) {

@@ -27,0 +21,0 @@ if (!client) {

@@ -6,8 +6,2 @@ const RedisMutex = require('./RedisMutex')

const DEFAULT_TIMEOUTS = {
lockTimeout: 10000,
acquireTimeout: 10000,
retryInterval: 10
}
class RedisSemaphore extends RedisMutex {

@@ -19,7 +13,7 @@ constructor(

{
lockTimeout,
acquireTimeout,
retryInterval,
lockTimeout = 10000,
acquireTimeout = 10000,
retryInterval = 10,
refreshInterval
} = DEFAULT_TIMEOUTS
} = {}
) {

@@ -26,0 +20,0 @@ super(client, key, {

{
"name": "redis-semaphore",
"version": "1.0.2",
"version": "1.0.3",
"description": "Distributed mutex and semaphore based on Redis",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,3 +21,3 @@ # redis-semaphore

```bash
npm install redis-semaphore ioredis
npm install --save redis-semaphore ioredis
# or

@@ -119,10 +119,2 @@ yarn add redis-semaphore ioredis

## Installation
```bash
npm install --save redis-semaphore
# or
yarn add redis-semaphore
```
## License

@@ -129,0 +121,0 @@