({
filename,
concurrency,
onTaskStart,
onTaskDone,
onTaskError,
showOutput,
maxWeight,
taskWeight,
}: {
filename: string;
concurrency: number;
onTaskStart: (tasks: string[], weight: number) => void;
onTaskDone: (
tasks: string[],
code: number,
duration: number
) => Promise<void>;
onTaskError: (tasks: string[]) => void;
showOutput: (tasks: string[]) => boolean;
maxWeight: number;
taskWeight: (task: string) => number;
})
| 77 | #queued = false; |
| 78 | |
| 79 | constructor({ |
| 80 | filename, |
| 81 | concurrency, |
| 82 | onTaskStart, |
| 83 | onTaskDone, |
| 84 | onTaskError, |
| 85 | showOutput, |
| 86 | maxWeight, |
| 87 | taskWeight, |
| 88 | }: { |
| 89 | filename: string; |
| 90 | concurrency: number; |
| 91 | onTaskStart: (tasks: string[], weight: number) => void; |
| 92 | onTaskDone: ( |
| 93 | tasks: string[], |
| 94 | code: number, |
| 95 | duration: number |
| 96 | ) => Promise<void>; |
| 97 | onTaskError: (tasks: string[]) => void; |
| 98 | showOutput: (tasks: string[]) => boolean; |
| 99 | maxWeight: number; |
| 100 | taskWeight: (task: string) => number; |
| 101 | }) { |
| 102 | this.#filename = filename; |
| 103 | this.#concurrency = concurrency; |
| 104 | this.#onTaskStart = onTaskStart; |
| 105 | this.#onTaskDone = onTaskDone; |
| 106 | this.#onTaskError = onTaskError; |
| 107 | this.#showOutput = showOutput; |
| 108 | this.#maxWeight = maxWeight; |
| 109 | this.#getWeight = taskWeight; |
| 110 | } |
| 111 | |
| 112 | run(task: string) { |
| 113 | this.#pending.push(task); |
nothing calls this directly
no outgoing calls
no test coverage detected