From 310371658bef90e8c982eaf94eea99c63617d7ab Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 Feb 2019 11:44:08 +0900 Subject: 重いのでジョブキュー無効化 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/queue/processors/export-notes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/queue/processors/export-notes.ts') 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 { 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 { userId: user._id, }); - job.reportProgress(exportedNotesCount / total); + if (job.reportProgress) job.reportProgress(exportedNotesCount / total); } await new Promise((res, rej) => { -- cgit v1.2.3-freya