➿ Added concurrency of 30 to import queue
This commit is contained in:
@@ -99,15 +99,15 @@ export default class ApiService extends Service {
|
|||||||
console.log("Client connected via websocket!");
|
console.log("Client connected via websocket!");
|
||||||
|
|
||||||
client.on("action", async (action) => {
|
client.on("action", async (action) => {
|
||||||
|
console.log("ACCCCCTION", action);
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case "LS_IMPORT":
|
case "LS_IMPORT":
|
||||||
// 1. Send task to queue
|
// 1. Send task to queue
|
||||||
const result = await this.broker.call(
|
await this.broker.call(
|
||||||
"import.newImport",
|
"import.newImport",
|
||||||
action.data,
|
action.data,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
client.emit("LS_COVER_EXTRACTED", result);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export default class ImportService extends Service {
|
|||||||
}>
|
}>
|
||||||
) {
|
) {
|
||||||
// 1. Walk the Source folder
|
// 1. Walk the Source folder
|
||||||
|
|
||||||
klaw(path.resolve(COMICS_DIRECTORY))
|
klaw(path.resolve(COMICS_DIRECTORY))
|
||||||
// 1.1 Filter on .cb* extensions
|
// 1.1 Filter on .cb* extensions
|
||||||
.pipe(
|
.pipe(
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export default class LibraryQueueService extends Service {
|
|||||||
hooks: {},
|
hooks: {},
|
||||||
queues: {
|
queues: {
|
||||||
"process.import": {
|
"process.import": {
|
||||||
|
concurrency: 30,
|
||||||
async process(job: SandboxedJob) {
|
async process(job: SandboxedJob) {
|
||||||
console.info("New job received!", job.data);
|
console.info("New job received!", job.data);
|
||||||
console.info(`Processing queue...`);
|
console.info(`Processing queue...`);
|
||||||
|
|||||||
Reference in New Issue
Block a user