remove now unused redlock

This commit is contained in:
HF 2022-04-04 04:22:53 +02:00
parent 4735bd12a9
commit 12f2862769
2 changed files with 0 additions and 26 deletions

View File

@ -29,7 +29,6 @@
"connect-redis": "^6.0.0",
"cookie": "^0.4.1",
"core-js": "^3.20.2",
"cors": "^2.8.4",
"etag": "^1.8.1",
"express": "^4.17.2",
"express-session": "^1.17.2",
@ -59,7 +58,6 @@
"react-stay-scrolled": "^7.4.0",
"react-toggle-button": "^2.1.0",
"redis": "^3.1.2",
"redlock": "^4.0.0",
"redux": "^4.1.2",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",

View File

@ -2,7 +2,6 @@
import bluebird from 'bluebird';
import redis from 'redis';
import Redlock from 'redlock';
import { REDIS_URL } from '../core/config';
@ -10,27 +9,4 @@ bluebird.promisifyAll(redis.RedisClient.prototype);
bluebird.promisifyAll(redis.Multi.prototype);
const client = redis.createClient(REDIS_URL, { return_buffers: true });
export const redlock = new Redlock(
// you should have one redis for each redis node
// in your cluster
[client],
{
// the expected clock drift; for more details
// see http://redis.io/topics/distlock
driftFactor: 0.01, // time in ms
// the max number of times Redlock will attempt
// to lock a resource before erroring
retryCount: 5,
// the time in ms between attempts
retryDelay: 200, // time in ms
// the max time in ms randomly added to retries
// to improve performance under high contention
// see https://www.awsarchitectureblog.com/2015/03/backoff.html
retryJitter: 200, // time in ms
},
);
export default client;