From a974f76b0a7b501f5acd69cc7ecd4bef033ac47c Mon Sep 17 00:00:00 2001 From: Roj Date: Sun, 12 May 2024 12:58:17 +0300 Subject: [PATCH] Cleanup --- download_manager.ts | 4 ---- worker.ts | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/download_manager.ts b/download_manager.ts index 3223938..d332ee0 100644 --- a/download_manager.ts +++ b/download_manager.ts @@ -33,12 +33,10 @@ export class DownloadManager { offset += size; } } - console.log({haveAllParts}) let download: Download | undefined; if (!haveAllParts) { download = this.#startDownload(fileId, partsAvailable, offset); } - console.log({partsAvailable}) for (let i = 0; i < partsAvailable; ++i) { const part = await Deno.readFile(path.join(dir, i + "")); offset += part.byteLength; @@ -56,7 +54,6 @@ export class DownloadManager { } else if (download.haveAllParts) { break; } - console.log('waiting for partAvailable') await new Promise((r) => { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), 5000); @@ -94,7 +91,6 @@ class Download extends EventTarget { private offset: number, ) { super(); - console.log({fileId, partsAvailable, offset}) } async start() { diff --git a/worker.ts b/worker.ts index 5c98aca..34966be 100644 --- a/worker.ts +++ b/worker.ts @@ -28,10 +28,9 @@ import { InputError } from "mtkruto/0_errors.ts"; import { setLogVerbosity } from "mtkruto/1_utilities.ts"; import { functions, setLoggingProvider, types } from "mtkruto/mod.ts"; -import { serialize } from "./tl_json.ts"; -import { deserialize } from "./tl_json.ts"; import { transform } from "./transform.ts"; import { fileLogger } from "./file_logger.ts"; +import { deserialize, serialize } from "./tl_json.ts"; import { isFunctionDisallowed } from "./disallowed_functions.ts"; import { ClientManager, ClientStats } from "./client_manager.ts"; import { ALLOWED_METHODS, AllowedMethod } from "./allowed_methods.ts";