MCPcopy Create free account
hub / github.com/appium/appium / constructor

Method constructor

packages/support/lib/internal/write-queue.ts:21–30  ·  view source on GitHub ↗

* @param maxJobs The maximum number of jobs running at the same time * @param maxBytes The maximum total size of the data held by running jobs

(maxJobs: number, maxBytes: number)

Source from the content-addressed store, hash-verified

19 * @param maxBytes The maximum total size of the data held by running jobs
20 */
21 constructor(maxJobs: number, maxBytes: number) {
22 this.maxJobs = Math.max(1, maxJobs);
23 this.maxBytes = maxBytes;
24 this.failed = new Promise<never>((_resolve, reject) => {
25 this.rejectFailed = reject;
26 });
27 // The failure is reported to those who wait for it, and by submit and drain
28 // oxlint-disable-next-line promise/prefer-await-to-then -- only marks the rejection as handled
29 this.failed.catch(() => {});
30 }
31
32 /**
33 * Starts the job as soon as there is capacity. Jobs with the same key never overlap.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected