From af4b67baad77819af9929f4b05ba5ed7e82676e8 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 8 Apr 2022 20:59:28 +0200 Subject: [PATCH] [Size] Fix mixed bundles (#1817) --- src/util/download.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/download.ts b/src/util/download.ts index 1321f1f9a..b3166d188 100644 --- a/src/util/download.ts +++ b/src/util/download.ts @@ -1,4 +1,4 @@ -import { sleep } from '../lib/gramjs/Helpers'; +import { pause } from './schedulers'; type PendingDownload = { url: string; @@ -29,7 +29,7 @@ async function processQueue() { downloadOne(pendingDownload); count++; if (count === LIMIT_PER_BATCH) { - await sleep(BATCH_INTERVAL); + await pause(BATCH_INTERVAL); count = 0; } }