⚙️ Switched the transporter to Redis

This commit is contained in:
2021-11-23 23:23:47 -08:00
parent e270b6a2b3
commit ae91b12abc
4 changed files with 12 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ const brokerConfig: BrokerOptions = {
// More info: https://moleculer.services/docs/0.14/networking.html
// Note: During the development, you don't need to define it because all services will be loaded locally.
// In production you can set it via `TRANSPORTER=nats://localhost:4222` environment variable.
transporter: "NATS", // "NATS"
transporter: "redis", // "NATS"
// Define a cacher.
// More info: https://moleculer.services/docs/0.14/caching.html

13
package-lock.json generated
View File

@@ -20,6 +20,7 @@
"dotenv": "^10.0.0",
"fs-extra": "^10.0.0",
"imghash": "^0.0.9",
"ioredis": "^4.28.1",
"jsdom": "^15.2.1",
"leven": "^3.1.0",
"lodash": "^4.17.21",
@@ -6333,9 +6334,9 @@
}
},
"node_modules/ioredis": {
"version": "4.28.0",
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.28.0.tgz",
"integrity": "sha512-I+zkeeWp3XFgPT2CtJKxvaF5FjGBGt4yGYljRjQecdQKteThuAsKqffeF1lgHVlYnuNeozRbPOCDNZ7tDWPeig==",
"version": "4.28.1",
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.28.1.tgz",
"integrity": "sha512-7gcrUJEcPHWy+eEyq6wIZpXtfHt8crhbc5+z0sqrnHUkwBblXinygfamj+/jx83Qo+2LW3q87Nj2VsuH6BF2BA==",
"dependencies": {
"cluster-key-slot": "^1.1.0",
"debug": "^4.3.1",
@@ -19492,9 +19493,9 @@
}
},
"ioredis": {
"version": "4.28.0",
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.28.0.tgz",
"integrity": "sha512-I+zkeeWp3XFgPT2CtJKxvaF5FjGBGt4yGYljRjQecdQKteThuAsKqffeF1lgHVlYnuNeozRbPOCDNZ7tDWPeig==",
"version": "4.28.1",
"resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.28.1.tgz",
"integrity": "sha512-7gcrUJEcPHWy+eEyq6wIZpXtfHt8crhbc5+z0sqrnHUkwBblXinygfamj+/jx83Qo+2LW3q87Nj2VsuH6BF2BA==",
"requires": {
"cluster-key-slot": "^1.1.0",
"debug": "^4.3.1",

View File

@@ -46,6 +46,7 @@
"dotenv": "^10.0.0",
"fs-extra": "^10.0.0",
"imghash": "^0.0.9",
"ioredis": "^4.28.1",
"jsdom": "^15.2.1",
"leven": "^3.1.0",
"lodash": "^4.17.21",

View File

@@ -88,8 +88,9 @@ export const extractCoverFromFile = async (
walkedFolder.name +
"_cover.jpg"
);
const ebookMetaPath =
`${process.env.CALIBRE_EBOOK_META_PATH}` || `ebook-meta`;
const ebookMetaPath = process.env.CALIBRE_EBOOK_META_PATH
? `${process.env.CALIBRE_EBOOK_META_PATH}`
: `ebook-meta`;
result = await calibre.run(
ebookMetaPath,
[constructedPaths.inputFilePath],