({
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;
})
| 116 | #queued = false; |
| 117 | |
| 118 | constructor({ |
| 119 | filename, |
| 120 | concurrency, |
| 121 | onTaskStart, |
| 122 | onTaskDone, |
| 123 | onTaskError, |
| 124 | showOutput, |
| 125 | maxWeight, |
| 126 | taskWeight, |
| 127 | }: { |
| 128 | filename: string; |
| 129 | concurrency: number; |
| 130 | onTaskStart: (tasks: string[], weight: number) => void; |
| 131 | onTaskDone: ( |
| 132 | tasks: string[], |
| 133 | code: number, |
| 134 | duration: number |
| 135 | ) => Promise<void>; |
| 136 | onTaskError: (tasks: string[]) => void; |
| 137 | showOutput: (tasks: string[]) => boolean; |
| 138 | maxWeight: number; |
| 139 | taskWeight: (task: string) => number; |
| 140 | }) { |
| 141 | this.#filename = filename; |
| 142 | this.#concurrency = concurrency; |
| 143 | this.#onTaskStart = onTaskStart; |
| 144 | this.#onTaskDone = onTaskDone; |
| 145 | this.#onTaskError = onTaskError; |
| 146 | this.#showOutput = showOutput; |
| 147 | this.#maxWeight = maxWeight; |
| 148 | this.#getWeight = taskWeight; |
| 149 | } |
| 150 | |
| 151 | run(task: string) { |
| 152 | this.#pending.push(task); |
nothing calls this directly
no outgoing calls
no test coverage detected