🔧 Tweaking the import queue call

This commit is contained in:
2022-04-18 16:02:34 -07:00
parent 1519058a02
commit e7e230503e

View File

@@ -58,7 +58,7 @@ export default class QueueService extends Service {
hooks: {},
queues: {
"process.import": {
concurrency: 1,
concurrency: 20,
async process(job: SandboxedJob) {
console.info("New job received!", job.data);
console.info(`Processing queue...`);
@@ -89,9 +89,7 @@ export default class QueueService extends Service {
// write to mongo
console.log("Writing to mongo...");
const dbImportResult = await this.broker.call(
"library.rawImportToDB",
{
await this.broker.call("library.rawImportToDB", {
importStatus: {
isImported: true,
tagged: false,
@@ -119,11 +117,18 @@ export default class QueueService extends Service {
acquisition: {
wanted: false,
},
}
);
console.log("JAMA", dbImportResult);
});
return {
dbImportResult,
data: {
result,
inferredMetadata: {
issue: inferredIssueDetails,
},
sourcedMetadata: {
comicInfo: comicInfoJSON,
comicvine: {},
},
},
id: job.id,
worker: process.pid,
};