summaryrefslogtreecommitdiff
path: root/src/queue/processors
diff options
context:
space:
mode:
Diffstat (limited to 'src/queue/processors')
-rw-r--r--src/queue/processors/export-blocking.ts4
-rw-r--r--src/queue/processors/export-following.ts4
-rw-r--r--src/queue/processors/export-mute.ts4
-rw-r--r--src/queue/processors/export-notes.ts4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/queue/processors/export-blocking.ts b/src/queue/processors/export-blocking.ts
index 95465a5e51..b30d8e3bc8 100644
--- a/src/queue/processors/export-blocking.ts
+++ b/src/queue/processors/export-blocking.ts
@@ -48,7 +48,7 @@ export async function exportBlocking(job: bq.Job, done: any): Promise<void> {
if (blockings.length === 0) {
ended = true;
- job.reportProgress(100);
+ if (job.reportProgress) job.reportProgress(100);
break;
}
@@ -74,7 +74,7 @@ export async function exportBlocking(job: bq.Job, done: any): Promise<void> {
blockerId: user._id,
});
- job.reportProgress(exportedCount / total);
+ if (job.reportProgress) job.reportProgress(exportedCount / total);
}
stream.end();
diff --git a/src/queue/processors/export-following.ts b/src/queue/processors/export-following.ts
index 13ba0888f0..e6521d0652 100644
--- a/src/queue/processors/export-following.ts
+++ b/src/queue/processors/export-following.ts
@@ -48,7 +48,7 @@ export async function exportFollowing(job: bq.Job, done: any): Promise<void> {
if (followings.length === 0) {
ended = true;
- job.reportProgress(100);
+ if (job.reportProgress) job.reportProgress(100);
break;
}
@@ -74,7 +74,7 @@ export async function exportFollowing(job: bq.Job, done: any): Promise<void> {
followerId: user._id,
});
- job.reportProgress(exportedCount / total);
+ if (job.reportProgress) job.reportProgress(exportedCount / total);
}
stream.end();
diff --git a/src/queue/processors/export-mute.ts b/src/queue/processors/export-mute.ts
index 8f72133cd6..74456c1da2 100644
--- a/src/queue/processors/export-mute.ts
+++ b/src/queue/processors/export-mute.ts
@@ -48,7 +48,7 @@ export async function exportMute(job: bq.Job, done: any): Promise<void> {
if (mutes.length === 0) {
ended = true;
- job.reportProgress(100);
+ if (job.reportProgress) job.reportProgress(100);
break;
}
@@ -74,7 +74,7 @@ export async function exportMute(job: bq.Job, done: any): Promise<void> {
muterId: user._id,
});
- job.reportProgress(exportedCount / total);
+ if (job.reportProgress) job.reportProgress(exportedCount / total);
}
stream.end();
diff --git a/src/queue/processors/export-notes.ts b/src/queue/processors/export-notes.ts
index 4d973d015c..32e4cd1d6c 100644
--- a/src/queue/processors/export-notes.ts
+++ b/src/queue/processors/export-notes.ts
@@ -58,7 +58,7 @@ export async function exportNotes(job: bq.Job, done: any): Promise<void> {
if (notes.length === 0) {
ended = true;
- job.reportProgress(100);
+ if (job.reportProgress) job.reportProgress(100);
break;
}
@@ -83,7 +83,7 @@ export async function exportNotes(job: bq.Job, done: any): Promise<void> {
userId: user._id,
});
- job.reportProgress(exportedNotesCount / total);
+ if (job.reportProgress) job.reportProgress(exportedNotesCount / total);
}
await new Promise((res, rej) => {