👮🏼‍♂️ chokidar support

This commit is contained in:
2021-09-18 09:26:26 -07:00
parent a74ac6464f
commit ece7b99feb
5 changed files with 160 additions and 14 deletions

View File

@@ -13,7 +13,7 @@ import { walkFolder } from "../utils/file.utils";
import { convertXMLToJSON } from "../utils/xml.utils";
import https from "https";
import { logger } from "../utils/logger.utils";
import { sendRabbitMQ } from "../queue/importQueue";
import { sendToRabbitMQ } from "../queue/importQueue";
import {
IExtractComicBookCoverErrorResponse,
IExtractedComicBookCoverFile,
@@ -126,7 +126,7 @@ export default class ImportService extends Service {
{}
);
// 3. Send to the queue
sendRabbitMQ(
sendToRabbitMQ(
"comicBookCovers",
JSON.stringify({
comicBookCoverMetadata,
@@ -312,6 +312,14 @@ export default class ImportService extends Service {
return await Comic.findById(ctx.params.id);
},
},
axn: {
rest: "GET /axn",
params: {},
async handler(ctx: Context<{path, stats}>) {
logger.info(ctx.params);
return {"pandurang": "hari"};
}
},
},
methods: {
getComicVineVolumeMetadata: (apiDetailURL) =>