MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / waitForCapacity

Method waitForCapacity

client/js/src/internal/upload/queue.ts:41–50  ·  view source on GitHub ↗
(expectedSize: number, signal?: AbortSignal)

Source from the content-addressed store, hash-verified

39 *
40 * This is used to limit the number of concurrent uploads to avoid
41 * overloading the server, or get rate limited.
42 *
43 * Each file upload consumes memory and is limited by the number of
44 * concurrent block uploads for each file.
45 *
46 * This queue is straitforward and does not have any priority mechanism
47 * or other features, such as limiting total number of blocks being
48 * uploaded. That is something we want to add in the future to be
49 * more performant for many small file uploads.
50 */
51export class UploadQueue {
52 private totalFileUploads = 0;
53

Callers 4

getFileUploaderFunction · 0.45
getFileUploaderFunction · 0.45
getFileRevisionUploaderFunction · 0.45
queue.test.tsFile · 0.45

Calls 1

waitForConditionFunction · 0.90

Tested by

no test coverage detected