summaryrefslogtreecommitdiff
path: root/src/queue/processors/db/export-blocking.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/queue/processors/db/export-blocking.ts')
-rw-r--r--src/queue/processors/db/export-blocking.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/queue/processors/db/export-blocking.ts b/src/queue/processors/db/export-blocking.ts
index 44025ec960..c4b8c9438d 100644
--- a/src/queue/processors/db/export-blocking.ts
+++ b/src/queue/processors/db/export-blocking.ts
@@ -33,10 +33,9 @@ export async function exportBlocking(job: Bull.Job, done: any): Promise<void> {
const stream = fs.createWriteStream(path, { flags: 'a' });
let exportedCount = 0;
- let ended = false;
let cursor: any = null;
- while (!ended) {
+ while (true) {
const blockings = await Blockings.find({
where: {
blockerId: user.id,
@@ -49,7 +48,6 @@ export async function exportBlocking(job: Bull.Job, done: any): Promise<void> {
});
if (blockings.length === 0) {
- ended = true;
job.progress(100);
break;
}