Added concurrency of 30 to import queue

This commit is contained in:
2021-12-04 09:34:33 -08:00
parent 2c16de674f
commit ecd5d155fc
3 changed files with 4 additions and 2 deletions

View File

@@ -99,15 +99,15 @@ export default class ApiService extends Service {
console.log("Client connected via websocket!");
client.on("action", async (action) => {
console.log("ACCCCCTION", action);
switch (action.type) {
case "LS_IMPORT":
// 1. Send task to queue
const result = await this.broker.call(
await this.broker.call(
"import.newImport",
action.data,
{}
);
client.emit("LS_COVER_EXTRACTED", result);
break;
}
});

View File

@@ -80,6 +80,7 @@ export default class ImportService extends Service {
}>
) {
// 1. Walk the Source folder
klaw(path.resolve(COMICS_DIRECTORY))
// 1.1 Filter on .cb* extensions
.pipe(

View File

@@ -28,6 +28,7 @@ export default class LibraryQueueService extends Service {
hooks: {},
queues: {
"process.import": {
concurrency: 30,
async process(job: SandboxedJob) {
console.info("New job received!", job.data);
console.info(`Processing queue...`);