summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-11-12 15:48:28 +0100
committerMar0xy <marie@kaifa.ch>2023-11-12 15:48:28 +0100
commitb7fc13efb73b08a77a0a087881f943d9502052b3 (patch)
tree249d012baa996d44185f2aad7d94f005ba775ca5 /packages/backend/src/queue
parentupd: update limit (diff)
downloadsharkey-b7fc13efb73b08a77a0a087881f943d9502052b3.tar.gz
sharkey-b7fc13efb73b08a77a0a087881f943d9502052b3.tar.bz2
sharkey-b7fc13efb73b08a77a0a087881f943d9502052b3.zip
upd: pass full thinuser
Diffstat (limited to 'packages/backend/src/queue')
-rw-r--r--packages/backend/src/queue/processors/ImportNotesProcessorService.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
index e7e8cee3a7..9a9858304a 100644
--- a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
+++ b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts
@@ -136,7 +136,7 @@ export class ImportNotesProcessorService {
const tweets = Object.keys(fakeWindow.window.YTD.tweets.part0).reduce((m, key, i, obj) => {
return m.concat(fakeWindow.window.YTD.tweets.part0[key].tweet);
}, []).filter(this._keepTweet);
- this.queueService.createImportTweetsToDbJob({ id: user.id }, tweets);
+ this.queueService.createImportTweetsToDbJob(job.data.user, tweets);
} finally {
cleanup();
}
@@ -167,7 +167,7 @@ export class ImportNotesProcessorService {
const postsJson = fs.readFileSync(outputPath + '/content/posts_1.json', 'utf-8');
const posts = JSON.parse(postsJson);
await this.uploadFiles(outputPath + '/media/posts', user);
- this.queueService.createImportIGToDbJob({ id: user.id }, posts);
+ this.queueService.createImportIGToDbJob(job.data.user, posts);
} else if (isOutbox) {
const actorJson = fs.readFileSync(outputPath + '/actor.json', 'utf-8');
const actor = JSON.parse(actorJson);
@@ -175,12 +175,12 @@ export class ImportNotesProcessorService {
if (isPleroma) {
const outboxJson = fs.readFileSync(outputPath + '/outbox.json', 'utf-8');
const outbox = JSON.parse(outboxJson);
- this.queueService.createImportPleroToDbJob({ id: user.id }, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
+ this.queueService.createImportPleroToDbJob(job.data.user, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
} else {
const outboxJson = fs.readFileSync(outputPath + '/outbox.json', 'utf-8');
const outbox = JSON.parse(outboxJson);
if (fs.existsSync(outputPath + '/media_attachments/files')) await this.uploadFiles(outputPath + '/media_attachments/files', user);
- this.queueService.createImportMastoToDbJob({ id: user.id }, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
+ this.queueService.createImportMastoToDbJob(job.data.user, outbox.orderedItems.filter((x: any) => x.type === 'Create' && x.object.type === 'Note'));
}
}
} finally {
@@ -203,7 +203,7 @@ export class ImportNotesProcessorService {
const notesJson = fs.readFileSync(path, 'utf-8');
const notes = JSON.parse(notesJson);
- this.queueService.createImportKeyNotesToDbJob({ id: user.id }, notes);
+ this.queueService.createImportKeyNotesToDbJob(job.data.user, notes);
cleanup();
}