diff --git a/package.json b/package.json index 0000f99..35b02fb 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/data/redis.js b/src/data/redis.js index fc44226..9946157 100644 --- a/src/data/redis.js +++ b/src/data/redis.js @@ -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;