diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-04-14 17:18:17 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-14 17:18:17 +0900 |
| commit | 054220db704a48b5db3066d660a48c09356e916c (patch) | |
| tree | 066988149192b184e6d4c628e97abdd91395e4d5 /src/queue/processors/db/export-notes.ts | |
| parent | Update README.md [AUTOGEN] (#4665) (diff) | |
| download | sharkey-054220db704a48b5db3066d660a48c09356e916c.tar.gz sharkey-054220db704a48b5db3066d660a48c09356e916c.tar.bz2 sharkey-054220db704a48b5db3066d660a48c09356e916c.zip | |
リファクタリング (#4587)
* Use I cap
* Avoid _
* Use default value instead of optional boolean
* Bye useless variable
* Bye verbose try-catch
Diffstat (limited to 'src/queue/processors/db/export-notes.ts')
| -rw-r--r-- | src/queue/processors/db/export-notes.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/queue/processors/db/export-notes.ts b/src/queue/processors/db/export-notes.ts index eaa5caf63f..d03a216a59 100644 --- a/src/queue/processors/db/export-notes.ts +++ b/src/queue/processors/db/export-notes.ts @@ -46,10 +46,9 @@ export async function exportNotes(job: Bull.Job, done: any): Promise<void> { }); let exportedNotesCount = 0; - let ended = false; let cursor: any = null; - while (!ended) { + while (true) { const notes = await Notes.find({ where: { userId: user.id, @@ -62,7 +61,6 @@ export async function exportNotes(job: Bull.Job, done: any): Promise<void> { }); if (notes.length === 0) { - ended = true; job.progress(100); break; } |