🔧 Tweaking the import queue call
This commit is contained in:
@@ -58,7 +58,7 @@ export default class QueueService extends Service {
|
|||||||
hooks: {},
|
hooks: {},
|
||||||
queues: {
|
queues: {
|
||||||
"process.import": {
|
"process.import": {
|
||||||
concurrency: 1,
|
concurrency: 20,
|
||||||
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...`);
|
||||||
@@ -89,9 +89,7 @@ export default class QueueService extends Service {
|
|||||||
|
|
||||||
// write to mongo
|
// write to mongo
|
||||||
console.log("Writing to mongo...");
|
console.log("Writing to mongo...");
|
||||||
const dbImportResult = await this.broker.call(
|
await this.broker.call("library.rawImportToDB", {
|
||||||
"library.rawImportToDB",
|
|
||||||
{
|
|
||||||
importStatus: {
|
importStatus: {
|
||||||
isImported: true,
|
isImported: true,
|
||||||
tagged: false,
|
tagged: false,
|
||||||
@@ -119,11 +117,18 @@ export default class QueueService extends Service {
|
|||||||
acquisition: {
|
acquisition: {
|
||||||
wanted: false,
|
wanted: false,
|
||||||
},
|
},
|
||||||
}
|
});
|
||||||
);
|
|
||||||
console.log("JAMA", dbImportResult);
|
|
||||||
return {
|
return {
|
||||||
dbImportResult,
|
data: {
|
||||||
|
result,
|
||||||
|
inferredMetadata: {
|
||||||
|
issue: inferredIssueDetails,
|
||||||
|
},
|
||||||
|
sourcedMetadata: {
|
||||||
|
comicInfo: comicInfoJSON,
|
||||||
|
comicvine: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
id: job.id,
|
id: job.id,
|
||||||
worker: process.pid,
|
worker: process.pid,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user