Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv committed May 12, 2024
1 parent d2ba47d commit a974f76
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions download_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -56,7 +54,6 @@ export class DownloadManager {
} else if (download.haveAllParts) {
break;
}
console.log('waiting for partAvailable')
await new Promise<void>((r) => {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 5000);
Expand Down Expand Up @@ -94,7 +91,6 @@ class Download extends EventTarget {
private offset: number,
) {
super();
console.log({fileId, partsAvailable, offset})
}

async start() {
Expand Down
3 changes: 1 addition & 2 deletions worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit a974f76

Please sign in to comment.