➿ 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!");
|
||||
|
||||
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;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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...`);
|
||||
|
||||
Reference in New Issue
Block a user