🔀 Shuffling some socket.io-redis settings around

This commit is contained in:
2022-04-17 22:19:41 -07:00
parent c0f010639d
commit 6e886fe1a4
4 changed files with 8 additions and 9 deletions

2
package-lock.json generated
View File

@@ -24,7 +24,6 @@
"filename-parser": "^1.0.4",
"fs-extra": "^10.0.0",
"imghash": "^0.0.9",
"ioredis": "^4.28.1",
"jsdom": "^15.2.1",
"klaw": "^4.0.1",
"leven": "^3.1.0",
@@ -45,7 +44,6 @@
"node-unrar-js": "^1.0.5",
"p7zip-threetwo": "^1.0.4",
"sharp": "^0.30.3",
"socket.io": "^4.4.0",
"socket.io-redis": "^6.1.1",
"threetwo-ui-typings": "^1.0.14",
"through2": "^4.0.2",

View File

@@ -46,14 +46,12 @@
"axios": "^0.25.0",
"axios-retry": "^3.2.4",
"bree": "^7.1.5",
"moleculer-io": "^2.0.0",
"chokidar": "^3.5.3",
"delay": "^5.0.0",
"dotenv": "^10.0.0",
"filename-parser": "^1.0.4",
"fs-extra": "^10.0.0",
"imghash": "^0.0.9",
"ioredis": "^4.28.1",
"jsdom": "^15.2.1",
"klaw": "^4.0.1",
"leven": "^3.1.0",
@@ -64,6 +62,7 @@
"moleculer-db": "^0.8.17",
"moleculer-db-adapter-mongo": "^0.4.7",
"moleculer-db-adapter-mongoose": "^0.8.12",
"moleculer-io": "^2.0.0",
"moleculer-web": "^0.10.4",
"mongoosastic-ts": "^5.0.7",
"mongoose": "^5.12.7",
@@ -73,7 +72,6 @@
"node-unrar-js": "^1.0.5",
"p7zip-threetwo": "^1.0.4",
"sharp": "^0.30.3",
"socket.io": "^4.4.0",
"socket.io-redis": "^6.1.1",
"threetwo-ui-typings": "^1.0.14",
"through2": "^4.0.2",

View File

@@ -4,8 +4,11 @@ import {
ServiceBroker,
ServiceSchema
} from "moleculer";
import SocketIOService from "moleculer-io";
const redisAdapter = require("socket.io-redis");
const SocketIOService = require("moleculer-io");
const redisURL = new URL(process.env.REDIS_URI);
console.log(redisURL.hostname);
export default class SocketService extends Service {
// @ts-ignore
@@ -60,7 +63,7 @@ export default class SocketService extends Service {
},
},
options: {
adapter: redisAdapter({ host: process.env.REDIS_URI, port: 6379 }),
adapter: redisAdapter({ host: redisURL.hostname, port: 6379 })
},
},
},

View File

@@ -3595,7 +3595,7 @@
"has" "^1.0.3"
"side-channel" "^1.0.4"
"ioredis@^4.0.0", "ioredis@^4.28.1", "ioredis@^4.28.5":
"ioredis@^4.0.0", "ioredis@^4.28.5":
"integrity" "sha512-3GYo0GJtLqgNXj4YhrisLaNNvWSNwSS2wS4OELGfGxH8I69+XfNdnmV1AyN+ZqMh0i7eX+SWjrwFKDBDgfBC1A=="
"resolved" "https://registry.npmjs.org/ioredis/-/ioredis-4.28.5.tgz"
"version" "4.28.5"
@@ -6522,7 +6522,7 @@
"socket.io-adapter" "~2.2.0"
"uid2" "0.0.3"
"socket.io@^4.4.0", "socket.io@^4.4.1":
"socket.io@^4.4.1":
"integrity" "sha512-s04vrBswdQBUmuWJuuNTmXUVJhP0cVky8bBDhdkf8y0Ptsu7fKU2LuLbts9g+pdmAdyMMn8F/9Mf1/wbtUN0fg=="
"resolved" "https://registry.npmjs.org/socket.io/-/socket.io-4.4.1.tgz"
"version" "4.4.1"